Skip to content
Templates for rendering RSS feeds for your Jekyll blog
Pull request Compare This branch is 31 commits behind snaptortoise:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Jekyll RSS Feed Templates

A few Liquid templates to use for rendering RSS feeds for your Jekyll blog. Featuring four kinds of feeds:

  • feed.xml — Renders the 10 most recent posts.
  • feed.category.xml — Only renders posts for a specific category. This example renders posts for a "miscellaneous" category.
  • feed.links.xml — Only contains posts that link to external websites noted by a link variable in the YAML Front Matter. Not a common Jekyll convention, but a good way to generating a linked list.
  • feed.articles.xml — Only showing articles that don't link to external sites; The opposite of feed.links.xml.

How to use

  • Update _config.yml as noted below, or manually replace the variables.
  • Copy one of the xml (ie, feed.xml) files to the root directory of your Jekyll blog.
  • Run jekyll.

In your generated _site folder you should find a properly formatted feed at feed.xml.

Customizing _config.yml

These templates rely on a customized version of _config.yml. The following lines have been added:

name: Your Blog's Name
description: A description for your blog

This makes it easy to reference the title, description and URL for your site in the feed templates using {{ }}, {{ site.description }} and {{ site.url }}. Even if you're not using these feed templates, you might find these variables useful when you're designing your layouts.

Note on YAML Front Matter block

The xml files contain a YAML Front Matter block with the line layout: none. This is necessary because Jekyll will not process a page with Liquid unless there is a YAML block at the top of the file.

Something went wrong with that request. Please try again.