11ty / eleventy-plugin-rss

A pack of Eleventy plugins for generating an RSS feed.
https://www.11ty.dev/docs/plugins/rss/
MIT License
92 stars 22 forks source link

Switch to Universal filters? #11

Open edbrannin opened 4 years ago

edbrannin commented 4 years ago

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

lewisnyman commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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