I have a blog based on Octopress. It generates an RSS
-feed, but that feed contains whole pages (posts) with images included.
How can I "shrink" it, so it would contain only headers of pages (posts)?
Octopress: 2.0
Jekyll: 2.0.3
I have a blog based on Octopress. It generates an RSS
-feed, but that feed contains whole pages (posts) with images included.
How can I "shrink" it, so it would contain only headers of pages (posts)?
Octopress: 2.0
Jekyll: 2.0.3
Copyright © 2021 Jogjafile Inc.
In feed.xml, instead of using
post.content
, you can usepost.excerpt
.Two solutions :
1 - Using octopress setup
Add a
<!-- more -->
in your posts to mark the limit betweenpost.excerpt
andpost.content
.content
still contains both.2 - Using Jekyll default
Remove this line
excerpt_separator: <!--more-->
from your config file. As the default excerpt separator is"\n\n"
(two new lines) excerpt will be created autoamtically.Alternative solution
Use the truncate filter
{{ post.content | truncate: 200 | expand_urls: site.url | cdata_escape }}
You will find more information about excerpt in Jekyll documentation