usnistgov / OSCAL-Pages

Open Security Controls Assessment Language (OSCAL) Website Content
https://pages.nist.gov/OSCAL/
Other
7 stars 14 forks source link

RSS feed timestamps are incorrect #47

Closed aj-stein-nist closed 10 months ago

aj-stein-nist commented 1 year ago

Review the hugo configuration and relevant template information to determine why timestamps are always like below in the RSS XML when developing locally or when published on the production site.

<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>

Determine the root cause and draft a PR to properly generate timestamps for the production site build and for local development, if possible.

See https://github.com/usnistgov/OSCAL-Pages/pull/44#issuecomment-1726491380 for more details about original report.

Arminta-Jenkins-NIST commented 1 year ago

At 10/5 Triage Meeting: @nikitawootten-nist - Setting must be enabled or system timestamp will be used resulting in the above mentioned timestamp.

aj-stein-nist commented 1 year ago

So I did checkout the default templates and @nikitawootten-nist is correct about how they work. I so have understanding of how this works for web pages (not RSS feeds) by looking at our custom layouts and how we get the LastMod or last modified date, using the GitInfo feature/plugin of hugo). I need to look more into how the PubDate should be set without modifying this default template and causing more churn, because the pages do properly pick up this date, maybe there is some clever way to make the PubDate and LastMod "equivalent" in hugo so RSS feeds pick it up too? More to follow.

Arminta-Jenkins-NIST commented 1 year ago

At 10/12 Triage Meeting: There is a premade theme that @nikitawootten-nist uses. He will look at the theme to see if the timestamp is coming from the theme. @aj-stein-nist will coordinate with @nikitawootten-nist.

aj-stein-nist commented 1 year ago

@nikitawootten-nist is out of office today but I have been unable to use the docs and experimentation a method to fix this yet. I am dedicating tomorrow morning to look into this.

nikitawootten-nist commented 1 year ago

After reviewing this issue in depth, I've determined this issue is much simpler and simultaneously more annoying to solve. Hugo defaults to a .pubDate of Mon, 01 Jan 0001 00:00:00 +0000 when .date is not set in the front-matter.

Fixing this issue will involve adding dates to all pages and making it a policy that date fields are added for new pages.

nikitawootten-nist commented 10 months ago

Closed via https://github.com/usnistgov/OSCAL-Pages/pull/61