lxndrblz / anatole

Anatole is a minimalistic two-column theme for Hugo.
https://themes.gohugo.io/themes/anatole/
MIT License
651 stars 363 forks source link

RSS item descriptions do not consider actual post descriptions #340

Closed alexanderdavide closed 2 years ago

alexanderdavide commented 2 years ago

Describe the bug RSS considers content or summary as <description></> and ignores descriptions supplied in post front matters. Also, the content's or summary's HTML tags are added which make them hard to use anyway.

To Reproduce Steps to reproduce the behavior:

  1. Create a post with description supplied in front matter.
  2. See item's description on the RSS feed given on https://domain.tld/index.xml

Alternatively, see https://anatole-demo.netlify.app/index.xml.

Expected behavior Description in front matters should be considered as <description></> in RSS feed.

lxndrblz commented 2 years ago

Hi @alexanderdavide, what you are describing is caused by this line in the rss.xml:

https://github.com/lxndrblz/anatole/blob/80312357ceee167aa9f224281363933a47e27994/layouts/_default/rss.xml#L35-L39

As you can see the rss.xml file expects a summary. Personally, I always set up both a description and a summary. Both variables are default page variables:

https://gohugo.io/content-management/front-matter/

alexanderdavide commented 2 years ago

Hi @alexanderdavide, what you are describing is caused by this line in the rss.xml:

https://github.com/lxndrblz/anatole/blob/80312357ceee167aa9f224281363933a47e27994/layouts/_default/rss.xml#L35-L39

As you can see the rss.xml file expects a summary. Personally, I always set up both a description and a summary. Both variables are default page variables:

https://gohugo.io/content-management/front-matter/

That's fine but what I'm asking is why isn't the description front matter used as RSS <description> element? If I am setting description explicitly, I want it to be the description in RSS too. The summary should merely be a fallback.

lxndrblz commented 2 years ago

I agree. As the description is also the default in the arch type, we should exchange the summary variable for the description.