Adding an RSS feed to a Jekyll blog

I’ve added an RSS feed to this blog. Here’s what I did. Add to your Gemfile:

gem 'jekyll-feed'

Run:

bundle install

Add to your _config.yml:

gems:
  - jekyll-feed

Add to your HTML template:

<!doctype html>
<html lang="en">
  <head>
    <link rel="alternate" type="application/rss+xml" href="https://jameshfisher.com/feed.xml" />
    <!-- ... -->
  </head>
  <body>
    <!-- ... -->
    <a href="https://jameshfisher.com/feed.xml">RSS feed.</a>
    <!-- ... -->
  </body>
</html>

I wrote this because I felt like it. This post is not associated with my employer.