Open mofosyne opened 4 months ago
main doc is also lacking in steps for adding support for JSON feed.
Ergo we need to note to them that we should javascript functions in as well.
const pluginRss = require("@11ty/eleventy-plugin-rss");
module.exports = function(eleventyConfig) {
...
// Main RSS Plugin Base
eleventyConfig.addPlugin(pluginRss, {posthtmlRenderOptions: {}});
// JSON Feed required functions
eleventyConfig.addJavaScriptFunction("absoluteUrl", pluginRss.absoluteUrl);
eleventyConfig.addJavaScriptFunction("htmlToAbsoluteUrls", pluginRss.convertHtmlToAbsoluteUrls);
eleventyConfig.addJavaScriptFunction("dateToRfc3339", pluginRss.dateToRfc3339);
...
}
Helped by #47 to automate feed creation template!
Docs were updated to reflect the new virtual template approach, which I think solves this one: https://www.11ty.dev/docs/plugins/rss/#virtual-template
After integrating
eleventy-plugin-rss
into my Eleventy project, I've realized there might be a bit of confusion for new users on how exactly this plugin functions out-of-the-box. Currently, the documentation provides excellent detail on how to install the plugin and the filters it provides for creating RSS feeds. However, it might not be immediately clear to users that by default, the plugin does not automatically generate an RSS feed without some manual setup.Clarification on Plugin Functionality
It would be beneficial to explicitly state at the beginning of the documentation that the plugin, upon installation, does not automatically create an RSS feed. Instead, it makes available a series of Liquid/Nunjucks template functions designed to aid in the manual creation of RSS feeds.
Guide on Initial Setup
A brief section titled "Getting Started with Your First RSS Feed" could greatly help users hit the ground running. This section should outline the steps to manually set up an RSS feed template within their Eleventy project.
I believe these enhancements to the documentation will demystify the initial setup process for
eleventy-plugin-rss
and highlight the powerful capabilities it offers for RSS feed generation. By providing clear, step-by-step guidance on creating a feed template and utilizing the plugin's functions, users can more easily leverage this tool to enrich their Eleventy projects.