You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 like exclude_regexp, keep_files_regexp etc to avoid conflicts with usual files/directories names.
The text was updated successfully, but these errors were encountered:
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.
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: