Closed zachleat closed 3 weeks ago
Usage example for RSS Plugin v2.0:
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
export default function(eleventyConfig) {
eleventyConfig.addPlugin(feedPlugin, {
type: "atom", // "json" or "rss" also supported.
outputPath: "/feed/feed.xml",
collection: {
name: "posts",
limit: 10,
},
metadata: {
language: "en",
title: "Blog Title",
subtitle: "This is a longer description about your blog.",
base: "https://example.com/",
author: {
name: "Your Name",
email: "me@example.com"
}
}
});
};
Finalizing this one, it’ll be ready with Eleventy core v3.0.0-alpha.13. Ironed out one last bug today with absolute URL transformation.
Docs are live on https://www.11ty.dev/docs/plugins/rss/#virtual-template
The docs right now require both
addPlugin
and creation of a file on your file system to populate your feed. We can simplify this to one step with virtual templates: https://github.com/11ty/eleventy/issues/1612https://www.11ty.dev/docs/plugins/rss/#sample-feed-templates
Related: #38 and https://github.com/11ty/eleventy/issues/3294