Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config Exclude is not excluding file types #3881

Closed
krausekai opened this issue Nov 22, 2019 · 2 comments · Fixed by #3882
Closed

Config Exclude is not excluding file types #3881

krausekai opened this issue Nov 22, 2019 · 2 comments · Fixed by #3882

Comments

@krausekai
Copy link

First to rule-out hexo, I made a test folder, installed micromatch and created a test file, and ran it in the command-line. Worked perfectly.

Micromatch Example - Working:

const micromatch = require('micromatch');

console.log(micromatch.isMatch("path/a/file.jpg", "**.jpg"));
const micromatch = require('micromatch');

console.log(micromatch.isMatch("path/a/file.jpg", ["**.jpg"]));

Hexo version:
4.0.0

Config Exclude Examples - Not Working:

exclude:
  - "**.jpg"
exclude:
  - ["**.jpg"]
exclude: "**.jpg"
exclude: ["**.jpg"]

Then, run hexo clean and hexo -g.

How come this isn't working in Hexo (using micromatch), but does work in micromatch?

@seaoak
Copy link
Member

seaoak commented Nov 22, 2019

I found that exclude: option is no effect for files in "post_asset_folder".

I think this is caused by a bug of lib/plugins/processor/post.js.

I will make a patch soon.

@krausekai
Copy link
Author

That seems to be the case. I am using the "post_asset_folder" option.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants