Skip to content

Feeds (RSS, Atom, JSON) v3.1.0

Latest

Choose a tag to compare

@zachleat zachleat released this 01 Oct 22:14
· 6 commits to main since this release
Immutable release. Only release title and notes can be modified.
71036e8
  • Add collection.sort option 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 with eleventyConfig.addTemplate so 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.subtitle for the feed description (matching Atom and RSS) when metadata.description isn't set.
  • Fix Atom Virtual Template using <icon> instead of <logo> for metadata.logo by @philipmw in #90
  • Swap debug dependency for obug. 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