Skip to content
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

Switch to Universal filters? #11

Open
edbrannin opened this issue Sep 11, 2019 · 3 comments
Open

Switch to Universal filters? #11

edbrannin opened this issue Sep 11, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@edbrannin
Copy link

https://www.11ty.io/docs/filters/#universal-filters

@lewisnyman
Copy link

lewisnyman commented Nov 29, 2020

I had a quick play around with this in this branch: https://github.com/lewisnyman/eleventy-plugin-rss/tree/universal-filters

The problem is that the posthtml plugin that htmlToAbsoluteUrls filter relies on is async, and nunjucks is the almost the only templating language that supports asynchronous filters.

@zachleat
Copy link
Member

Just as a related reminder, we do have a section on the docs about how to use these filters in other template languages: https://www.11ty.dev/docs/plugins/rss/#use-with-other-template-languages-new-in-rss-1.1.0

I would note that the use of Nunjucks here does give us a nice safe autoescape feature that some other template languages don‘t provide 👀

@zachleat
Copy link
Member

zachleat commented Jun 15, 2022

(and async filters work in Liquid as of Eleventy 1.x—fwiw)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants