This blog has relocated to https://coolbutuseless.github.ioand associated packages are now hosted at https://github.com/coolbutuseless.

29 April 2018

mikefc

RSS Setup in Blogdown

By default, blogdown in Rstats includes an RSS feed which is limited to just the first snippet from each article.

For some RSS aggregators, it’s probably nicer to have a full article showing up in the feed.

  1. Ensure you have a full baseURL in your config.toml e.g. baseURL = "https://coolbutuseless.github.io/"
  2. Ensure you have an rss.xml file
    • by default I think blogdown just uses the hugo’s internal rss.xml representation, but we need an actual file to modify
    • Copy the rss configuration from hugo’s embedded rss template
    • put this in a file at [your blog]/layouts/rss.xml
  3. Change the rss feed to be full content rather than summary
    • Find the line which says: <description>{{ .Summary | html }}</description>
    • Change it to: <description>{{ .Content | html }}</description>
  4. Put a limit on the number of articles which show up in your RSS feed
    • By default I think the RSS feed includes every post you’ve ever written.
    • Add rssLimit = 10 to your config.toml file to limit the number of articles in the feed (untested)

Resources