CaiJimmy / hugo-theme-stack

Card-style Hugo theme designed for bloggers

Home Page:https://stack.jimmycai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RSS lastBuildDate uses future (scheduled) post dates

asimmon opened this issue · comments

What happened?

The rss.xml templates builds the lastBuildDate XML value by including scheduled (future) content. As a result, the generated value can be set to some date in the future. It should be set to the last non-draft and non-future content.

Future content is not yet visible so the RSS feed should not use it.

Reproduction steps:

  • Create one non-draft post with a past/current date T1
  • Create another non-draft post with a future date T2
  • Open the generated RSS feed index.xml
  • lastBuildDate is set to T2 instead of T1

Hugo version

0.124.1

Theme version

3.25.0

What browsers are you seeing the problem on?

Chrome

More information about the browser

No response

Relevant log output

No response

Link to Minimal Reproducible Example

https://github.com/CaiJimmy/hugo-theme-stack-starter