Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to use new Virtual Templates feature to avoid creating feed template files manually. #47

Closed
zachleat opened this issue May 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@zachleat
Copy link
Member

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: 11ty/eleventy#1612

https://www.11ty.dev/docs/plugins/rss/#sample-feed-templates

Related: #38 and 11ty/eleventy#3294

@zachleat
Copy link
Member Author

zachleat commented Jun 10, 2024

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"
			}
		}
	});
};

@zachleat zachleat added this to the Eleventy RSS Plugin v2.0 milestone Jun 10, 2024
zachleat added a commit to 11ty/eleventy-base-blog that referenced this issue Jun 10, 2024
zachleat added a commit to 11ty/eleventy that referenced this issue Jun 11, 2024
…HTML Base plugin to apply via `renderTransforms` even when a pathPrefix is not in use. Related to 11ty/eleventy-plugin-rss#47
@zachleat
Copy link
Member Author

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.

@zachleat
Copy link
Member Author

Docs are live on https://www.11ty.dev/docs/plugins/rss/#virtual-template

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant