Firstly, you need to choose a subdirectory to host your feed on. Calling it feed seems to be a fairly popular choice, so I decided to follow the crowd. Create a folder called feed at the base of your Jekyll site, and create an index.xml file inside with the following contents (obviously swapping the references to Recursive for your own site details) :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
When you generate your site, this should create a feed/index.xml file in your generated ”site” folder. Now if you go to http://your-site.com/feed/index.xml_, you should see your generated RSS feed.
That trailing index.xml is a little ugly, so the next step is to get your feed to appear when users access the /feed/ folder directly. I serve everything with nginx, where we can use the index directive to set the index file for a folder :
1 2 3
You can achieve the same result in Apache using the DirectoryIndex directive :
Restart your webserver and you should be able to see your feed at http://your-site.com/feed/ without the trailing index.xml.
Now that our feed is up and running, we want to add it to FeedBurner. Add a new feed at FeedBurner pointing to your http://your-site.com/feed/ directory :
After clicking next a few times, you should get a FeedBurner URL for your feed :
Now things get a little more complicated - we want to redirect everyone to our new feed URL, but we still want FeedBurner to be able to see the original feed from our site (we don’t want to redirect FeedBurner back to themselves). We can achieve this with a little nginx trickery, building on our previous nginx change :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
What this does is allow anyone with FeedBurner or FeedValidator in their user agent to access our original feed, but redirects everyone else to the new FeedBurner feed. It’s a good idea to check that your feed is still working after this step at feedvalidator.org.
Once you’ve confirmed that your feed is still valid, you’re done!