Skip to content

RSS lastBuildDate uses future (scheduled) post dates #1005

@asimmon

Description

@asimmon

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions