HermanMartinus / bearblog

Free, no-nonsense, super fast blogging.
MIT License
2.36k stars 73 forks source link

Parameters don't populate in RSS feed content #286

Closed pimoore closed 1 month ago

pimoore commented 1 month ago

I created a new feature request on the roadmap about appending content using parameters to RSS feeds, but realized afterward there's a larger issue. Using a {{ parameter }} within a blog post renders correctly in the post itself, but displays the literal code in the RSS feed for the same post. For example, calling a meta_description in the post with the intention of using it as an intro or TL;DR that could be targeted with CSS, the RSS content literally displays "{{ post_description }}" instead of the text specified within the metadata. This also means moving the reply by email links in the above roadmap request into the post itself instead of the footer—while being picked up by the RSS feed—would also be broken.

I'm assuming the backend template creating the RSS feed doesn't currently have access to this data, or is running in tandem with the post generation. Is this something that can be fixed, either by passing these variables to the RSS template, or having the feed content generated subsequent to the post content?

HermanMartinus commented 1 month ago

I spotted the issue. The RSS feed was only getting the blog context for the parameters, but not the post context. I've fixed this and it using {{ post_description }} should work perfectly. I'll respond to the feature request on Nolt independently.

Thanks for reporting this :)