jekyll / jekyll-redirect-from

:twisted_rightwards_arrows: Seamlessly specify multiple redirections URLs for your pages and posts.
MIT License
781 stars 112 forks source link

Render liquid tags in redirect urls. #163

Closed deepfryed closed 6 years ago

deepfryed commented 6 years ago

This change allows to urls to include liquid tags, this used to work in v0.10.0 I believe.

benbalter commented 6 years ago

@deepfryed This is to allow users to put Liquid in the YAML front matter where the redirect is defined?

deepfryed commented 6 years ago

@benbalter yes, it's to allow liquid tags in the YAML Jekyll header in files.

benbalter commented 6 years ago

allow liquid tags in the YAML Jekyll header in files.

Does Jekyll do that anyplace else? Why is this a problem specific to this plugin? If not specific to this plugin, should it be implemented in Jekyll core (or another plugin)?

@gjtorikian do I recall you making a plugin to do just this?

gjtorikian commented 6 years ago

You do: https://github.com/gjtorikian/jekyll-conrefifier

deepfryed commented 6 years ago

I haven't used Jekyll much so didn't do much digging into it. This used to work in jekyll 3.0.3 / jekyll-redirect-from 0.10.0 and stopped working when I bumped the gems to 3.5.2 & 0.12.1 respectively.

benbalter commented 6 years ago

@deepfryed Thanks for the PR and for taking the time to dig into the code. I believe https://github.com/gjtorikian/jekyll-conrefifier implements what you're looking for, and should work with this plugin. If not, I'd be glad to review a PR that ensures compatibility (rather than duplicating that logic here).

gjtorikian commented 6 years ago

On the whole I agree but, devil's advocate, this is white-listed for GitHub Pages, which can be advantageous.

pathawks commented 6 years ago

I vote to close this as wont-fix

Jekyll doesn’t parse Liquid in frant matter anywhere else; I don’t think this plugin should be a special case.

As @benbalter mentioned, if there is another plugin that does this, we could ensure compatibility 👍🏼

DirtyF commented 6 years ago

@pathawks Fair enough, as much as I'd like to see Jekyll parse Liquid in Front Matter, this does not seem like the right place to do it.