- Add
collection.sortoption to the Virtual Template:"auto"(default, previous behavior),"descending"(newest first by date, regardless of collection order), or"ascending". Use"descending"if your collection is sorted newest-first and your feed was showing your oldest posts. #63 - Add
getFeedTemplate(options)export, which returns{ content, data }for use witheleventyConfig.addTemplateso you can choose the virtual template path yourself (useful for multiple feeds of the same type).import { rssPlugin, getFeedTemplate } from "@11ty/eleventy-plugin-rss"; export default function($config) { $config.addPlugin(rssPlugin); let { content, data } = getFeedTemplate({ type: "atom", outputPath: "/posts.xml", collection: { name: "posts" } }); $config.addTemplate("feeds/posts.njk", content, data); };
- Feed entries without a URL (e.g.
permalink: false) are now skipped by the Virtual Template instead of failing the build. #66 (thank you @robb-j for the assist in #59) - Plugin helpers (
feedPlugin,dateToRfc3339,dateToRfc822,getNewestCollectionItemDate,absoluteUrl,convertHtmlToAbsoluteUrls) are available on the default export again (matching CommonJS behavior in v2). Named exports are still the preferred method #91 - JSON Virtual Template now falls back to
metadata.subtitlefor the feeddescription(matching Atom and RSS) whenmetadata.descriptionisn't set. - Fix Atom Virtual Template using
<icon>instead of<logo>formetadata.logoby @philipmw in #90 - Swap
debugdependency forobug.DEBUG=Eleventy*works the same. #100
Milestone: https://github.com/11ty/plugin-rss/milestone/10?closed=1
Full Changelog: v3.0.0...v3.1.0