Skip to content

Instantly share code, notes, and snippets.

View emmahsax's full-sized avatar

Emma Sax emmahsax

View GitHub Profile
@emmahsax
emmahsax / jekyll-feed-with-multiple-environments.md
Last active November 11, 2020 19:01
Jekyll Feed with multiple environments

Jekyll Feed with Multiple Environments

What this will do is generate a two different feeds:

  • A feed.xml for your local development, which will contain the values you specify for your development environment in your _config.yml.
  • A feed.xml for your live site, which will have the values set in your _config.yml for your production environment.

This is necessary because without different values for title, description, etc, many feed readers will view the two feeds as the same, even if the post content is different This makes it difficult to test if your feed is working and updating locally.

You could add additional environments as well, such as development, test, staging, and production.