Update include tag to be more permissive#8618
Conversation
These special characters include '@' '#' '~' '+' '(' ')' '-' '{' '}' '[' and ']'.
https://en.wikipedia.org/wiki/Filename
mattr-
left a comment
There was a problem hiding this comment.
I'm fine with the additions as is, though I agree about both { and } being on the bubble for inclusion.
Thanks for prepping tests for this! ❤️
|
@mattr- Thank you! I removed |
@ashmaroli Hi! Are these style checks failing on |
|
@parkr I fixed the styles for Rubocop 1.12 |
|
@jekyll: merge +minor |
Parker Moore: Update include tag to be more permissive (#8618) Merge pull request 8618
|
@DirtyF i can't remember - is there an easy way to backport this to 3.x? I can't remember if @jekyllbot can do it for us or not. |
|
@parkr I never done a backport but according to parkr/auto-reply#31 @jekyllbot can't do this. There's a script/backport-pr in Jekyll's repository though |
Backport #8618 for v3.9.x: Update include tag to be more permissive
Summary
Our
{% include %}tag presently isn't permissive enough to handle many valid filenames, includefoo@bar.html. This@symbol is used by systems within the Node ecosystem and theincludetag is often used to selectively include HTML/JS/CSS from within a Node package in a Jekyll site.This does not include any of the reserved characters: https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words
It adds support for the following characters:
@#~+-(and)Context
This PR continues the work that @Convincible did in #7096.
We'd like to be able to use this in GitHub Pages, so I'll plan a back port to Jekyll 3.x as well.