Closed FranciscoG closed 10 months ago
I think I've figured it out.
Looking at the plugin source I noticed that it is only adding the filters to nunjucks templates: https://github.com/11ty/eleventy-plugin-rss/blob/5cf83502e29b88b32772f0274fcf9dd4041b4549/.eleventy.js#L34
What I needed was to use the more general addFilter
so adding this now in my eleventy config fixed the build issue.
// at this require at the top
const { getNewestCollectionItemDate, dateToRfc3339 } = require('@11ty/eleventy-plugin-rss')
// and then add the filters
eleventyConfig.addFilter("getNewestCollectionItemDate", getNewestCollectionItemDate);
eleventyConfig.addFilter("dateToRfc3339", dateToRfc3339);
The page builds all weird now but at least it's building.
I am working on a site that is using the eleventy-base-blog. I've been working on going full WebC templates and I ran into an issue while I was trying to convert the
feed.njk
link to the original version of the file: https://github.com/11ty/eleventy-base-blog/blob/main/content/feed/feed.njk
here's my conversion of it to
.webc
This is the error I get from the above code:
getNewestCollectionItemDate
comes from the RSS plugin: https://github.com/11ty/eleventy-plugin-rsshere's my Eleventy config, it's the same one as the Base Blog with the addition of WebC and an extra filter