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
feat: Add wildcards/regular expressions support to all options in _config.yml #9523
Comments
Wildcards haven't traditionally been supported in those fields because they're unsafe due to path traversal attacks. While path traversal attacks don't have the same impact on a static site generator compared to a web server, we do need to be aware of and mitigate the problem somehow. I would welcome a PR to support glob wildcards for these fields but adding regular expression support for these fields is not something I'm in favor of adding. |
How about adding separate options like |
No. Our config is full of too many options as it is. |
Ok. Maybe I will make plugin later. |
Summary
My idea is to add wildcards/regular expressions support for all options in config file (
_config.yml
) that accepts file or directory (e.g.include
,exclude
,keep_files
)Motivation
I think this feature should be added to jekyll core because most text/code editors create additional files in project directory and they are not always in separate directory. I thint it would be comfortably to exclude these files by adding few regexp lines to config file instead of manually adding each file to ignore list.
Drawbacks
I don't see any big drawbacks in this feature. Maybe it can conflict with file/directory names that contains regexp characters like
^
or$
but I think it is unlikely that someone will create files/directories with regexp-like names. Also I have idea to add additional options likeexclude_regexp
,keep_files_regexp
etc to avoid conflicts with usual files/directories names.The text was updated successfully, but these errors were encountered: