`ignored_content` does not work
Bug Report
Environment
Zola version: v0.15.3
Expected Behavior
ignored_content = ["*.icc", "readme.*", "README.*"]
Should exclude foobar.icc and README.md.
Current Behavior
Both files are included in the output_dir.
Step to reproduce
Running as following:
base_url = "https://foobar.com"
minify_html = false
output_dir = "_build"
compile_sass = false
build_search_index = false
ignored_content = ["*.icc", "readme.*", "Readme.*", "README.*"]
[slugify]
paths = "safe"
taxonomies = "safe"
anchors = "safe"
[markdown]
highlight_code = false
P.S. While we are at it, can ignored_content support regexp? Would allow much neater ?readme.* and such.
I've tried with one one of the ignored_content testcase and it seems to work as expected, that's weird.
P.S. While we are at it, can ignored_content support regexp? Would allow much neater ?readme.* and such.
ignored_content are globs so we support whatever https://docs.rs/globset/latest/globset/ is supported, not planning to add anything else.
Any updates?
Re-tested with v0.16.1 on Win10 and Debian 11 running on WSL2.
File ./static/img/README.md is copied to ./public/img/README.md after zola build.
Config file:
base_url = "http://localhost/"
ignored_content = ["*.icc", "readme.*", "Readme.*", "README.*"]
compile_sass = false
build_search_index = false
[markdown]
highlight_code = false
Ah ignored_content is only applied in the content directory, not in static
Wouldn't it make sense to use it for both locations?
It was initially meant to not include some files that are artifacts of building pages (like notes or whatever). I don't think it makes sense to have it filter the static folder which has always been "just copy all the content in there"
OK, can it be made optional? Plenty of use-cases where certain content in /static is useful during development/build and unnecessary in production.
It would be a new config variable, ignored_content does refer to the content directory. ignore_static?
Perfect.
I will work on this one.
Sorry to nag, but with #2209 merged, is there anything left to do? Can this issue be closed?