Initial Jekyll installation comes with a predefined RSS feed for your last 10 posts. Sometimes, you might need a feed for a single category. It’s very simple and I will show you how to do it.
RSS with all posts in category “Jekyll”
When you create a new Jekyll site, it contains a
As you see, it’s a simple XML file using
Liquid templates features.
The main part of this file is a
for loop, which generates all the feed items:
To have a category RSS feed, you need to create a copy of this file with a different name, for example,
feed.jekyll.xml and modify the
This will create an RSS feed with all posts (not limited to 10) in the
Here you can find the whole file in my blog.
One more thing - faster serve generation
If your Jekyll site or blog grows, you might have noticed, it takes more and more time to generate the site. It’s very inconvienient, when you test changes in the browser using
jekyll serve command. There are two very useful parameters to speed it up:
--limit_posts=10- tells jekyll to generate only the last 10 posts
--incremental- makes it process just the changed files
For me (about 50 posts) it improves generating time from more than 25 seconds to less than 1 second.
I hope you find it useful.