GitHub Pages can automatically create an Atom feed for your Jekyll blog. Atom is an XML-based feed format, similar to RSS, that allows other readers to subscribe to new blog posts.
Note: If a feed.xml file exists in the root of your repository, GitHub Pages will not override it.
Setting up
To enable automatic feed generation, you must add the following line to your site's _config.yml file:
gems:
- jekyll-feed
If you don't have a _config.yml file, you will need to create one in the root of your GitHub Pages repository. For more information, see Jekyll's official plugins documentation.
You may also wish to add the {% feed_meta %} tag to your layout's <head> section to allow browsers to more easily discover your site's feed.
Testing locally
To preview the output of your feed locally:
- Add
jekyll-feedto your site's _config.yml file - Make sure you're using the latest version of the GitHub Pages Gem, which contains these dependencies and plugins.
You should see a new feed.xml file generated in your Jekyll _site folder.