Skip to main content
Sitemap

RSS feed

Allow people to subscribe to your posts and read them in a feed reader

An RSS feed lets users subscribe to your content and read new posts in their feed reader. This plugin creates a feed using the XML Atom format that automatically includes your latest posts.

View an example RSS feed (may open in a feed reader)

Configure the RSS feed

To enable an RSS feed for all posts on your site, set templates.feed: true in your plugin options.

Or, you can customise the feed by using these options:

Template options
Name Type Description
title string

Sets the feed title (default is 'Feed').

collection string

Sets the collection to use for feed entries (default is 'feed')

size number

Sets the number of recent entries to include in the feed (default is 20)

url string

Sets the base URL for the feed (default is value used for options.url)

permalink string

Sets the file name and location (default is '/feed.xml'). Set to false to disable writing this file to the output folder.

Using a different collection of pages

By default the feed will include all pages that use the post layout.

You can create your own collection and set the feed to use entries from that collection instead.

Create a collection in eleventy.config.js:

eleventyConfig.addCollection('guide', (collection) => {
  return collection.getFilteredByGlob('app/guide/*.md')
})

Then update the collection template option to use 'guide'.

Change how entries appear in your feed

The RSS feed uses the feed layout. You can edit this layout to change how entries appear in your feed.

Replace the RSS feed

You can create your own RSS feed that replaces this one. To do this, create a page that saves to the same location (by default /feed.xml).

When you do this, your page will be used instead of the plugin’s default.