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

Ease Liquid evaluation after/from Converter plugins #5099

Closed
nhoizey opened this Issue Jul 12, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@nhoizey
Copy link
Contributor

nhoizey commented Jul 12, 2016

  • I believe this to be a bug, not a question about using Jekyll.
  • I Updated to the latest Jekyll (or) if on Github Pages to the latest github-pages
  • I Read the CONTRIBUTION file at https://jekyllrb.com/docs/contributing/
  • This is a feature request.

I made a "Cloudinarify" Converter plugin that generates jekyll-cloudinary Liquid tags from standard Markdown:
https://github.com/nhoizey/nicolas-hoizey.com/blob/7c606257d5659ce0c2006fc74c6d94d4252df5ce/_plugins/cloudinaryfy.rb

The aim is to facilitate publication with standard Markdown in any editor, while providing Cloudinary support when the content is published in a Jekyll site. Best of both worlds.

But, it seems Liquid tags from posts are parsed before Converters are run, so my Converter must also convert the Liquid tag to HTML.

I tried, but I don't know how to do it, because it needs a context that I don't have in the Converter: https://github.com/nhoizey/nicolas-hoizey.com/blob/7c606257d5659ce0c2006fc74c6d94d4252df5ce/_plugins/cloudinaryfy.rb#L58

I'm aware an issue has already been open to ask for the context in Converters, but it had a negative answer: #1509

I've also found a Pull Request that would allow some Converters to run before Liquid, but it's been closed by @parkr without merging: #917

So, is there a way to run a Liquid render after (or from) a Converter?

@parkr

This comment has been minimized.

Copy link
Member

parkr commented Jul 13, 2016

Have you considered writing a pre_render hook?

@nhoizey

This comment has been minimized.

Copy link
Contributor

nhoizey commented Jul 13, 2016

Not at all, I will look at it to see if it would be the answer, thanks.

@parkr parkr closed this Jul 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment