Migrating to Hugo / already read old posts RSS issue

We want to migrate a blog that currently people are subscribing to its RSS feed. When moving to Hugo we want to lose as few subscribers as possible.

  • We want to avoid triggering behavior in their newsreaders that would make it seem like all of the old posts, that they have already read, are new posts.
  • We want to make sure the format of our new RSS feed XML is very close to the old one.
    How could we achieve this?
    If we migrate everything to Hugo won’t the old posts appear as new? can’t this be handled inside Hugo?

Set the web server where your feed is hosted to return an HTTP 301 redirect response when it receives a request for the old feed.

It’s also possible to add this to the old feed, see https://www.rssboard.org/redirect-rss-feed. But my guess is that s standard 301 has the best support.

To avoid having old posts marked as unread you should make sure the guid-tag stays the same for the old posts. If the old feed lacks guid-tag I guess feed readers use the link-tag instead.

So you will most likely need to create a custom rss template. Start of with the built in or one from a theme. This is from my own Zen theme https://github.com/frjo/hugo-theme-zen/blob/master/layouts/_default/rss.xml