Add RSS to TeXt Theme-d Jekyll Site

Recently, I watched DistroTube's video about Elfeed, which prompted me to set up RSS for my own website. However, after looking through the documentation for the TeXt Theme for Jekyll, I found there was no out-of-the-box support for adding RSS to the bottom of the page.

In this post, I give the steps required to add the small RSS logo to the footer of your page and the appropriate HTML/Liquid code to add to implement a small RSS button in the footer of your webpage which links back to your feed.xml file. I assume that you are already using the TeXt Theme, but if you are not, then this guide can still be useful, although you will have to figure out the proper locations for the RSS SVG and the button inclusion snippet yourself. I also assume that you either already have a feed.xml file or are simultaneously setting up jekyll-feed to generate this file for you.

  1. Download the RSS SVG image[^1] to /_includes/svg/icon/social/, and name it rss.svg.
  1. Add the path to your feed.xml file to your _config.yml file. I placed this under the paths set, but if you can eally place it anywhere. My _config.yml paths section now looks like this:
paths:
  root: "/"
  home: "/"
  rss: "/feed.xml"
  1. Add the following snippet to the _includes/author-links.html file, wherever you want it.
{%- if site.paths.rss -%}
  <li title="{{ _locale_string_follow | replace: '[NAME]', 'RSS' }}">
    <a class="button button--circle rss-button" itemprop="sameAs" href="{{ url }} {{ site.paths.rss }}" target="_blank">
      <div class="icon">{%- include svg/icon/social/rss.svg -%}</div>
    </a>
  </li>
{%- endif -%}

And in theory, that should be it! Congratulations!<br> With this being such a simple change, I will look into getting this functionality merged into the main TeXt Theme package on GitHub, so that this "workaround" is no longer needed.

[^1]: The RSS SVG logo is licensed with: GPL, LGPL, MPL, MTL.