georgemandis / jekyll-rss-feeds

Templates for rendering RSS feeds for your Jekyll blog

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include entire post (not just excerpt) for feed.category.xml

jrosen48 opened this issue · comments

I'm using the feed.category.xml file to generate a feed for posts for a specific category. It works great, but only includes an excerpt, rather than the entire post. Is it possible to modify the .xml file to include the entire post?

The way it's setup it should only use the excerpt if it's specified in the front-matter:

{% if post.excerpt %}
    <description>{{ post.excerpt | xml_escape }}</description>
{% else %}
    <description>{{ post.content | xml_escape }}</description>
{% endif %}

If you need to have the excerpt metadata specified in your front-matter but don't want it included in your feed you could simply replace this whole block with:

<description>{{ post.content | xml_escape }}</description>

I'm inclined to leave the repo the way it is, but hopefully that helps!

Thanks much, just one question from a Jekyll and XML novice.

Maybe I'm conflating two things. I noticed in a feed reader (I checked with Feedly) only the excerpt appeared - if I were to replace the whole block with <description>{{ post.content | xml_escape }}</description> as you described above, is there another way to make the full post appear?

If you replace the whole block with that snippet it should make the whole post appear. If your goal is to have the entire post appear in the feed there really isn't another way in this situation, unless I'm misunderstanding your question?

:)

Thanks so much for your response.

Sorry, this may branching into not jekyll-rss-feeds-land.

So, when I subscribe tojekyll-rss-feeds this category feed generated through the feed.category.xml file: (https://jrosen48.github.io/feed.category.xml)[https://jrosen48.github.io/feed.category.xml]

This appears in Feedly--just the image and first paragraph: http://imgur.com/a/qkCfx

But, when I subscribe to this feed generated, if I understand correctly, through the jekyll-feed plugin: (https://jrosen48.github.io/feed.xml)[https://jrosen48.github.io/feed.xml]

This appears in Feedly--the entire post (the image is below): (http://imgur.com/a/O50p7)[http://imgur.com/a/O50p7]

Hmm. That does seem odd. I'm not familiar with Feedly, but my only thought might be the Feedly caches the feeds? If you try subscribing and resubscribing or maybe adding something like ?v1 to the end of the the URL (https://jrosen48.github.io/feed.category.xml?v1) maybe it'll stop looking at cache? You might also want to try writing a new post in that category to see if it works.

I think it's something related to that because the XML isn't that complicated and I'm not sure what else it could be. It looks rights!

Ah hah! Adding ?v1 did the trick; you must be right that Feedly may be caching the feeds; suscribing and resubscribing didn't do the trick, but adding that to the URL did.

Thanks again