Closed schu closed 2 months ago
@schu
The version string was added to the generator tag in v0.125.0 to address #11692, and was removed in v0.125.3 to address https://github.com/gohugoio/hugo/pull/12300#issuecomment-2068869567. We should have closed #11692 as "won't fix".
I'll look into the zero pubdate problem.
The Date
and Lastmod
roll-up to section, taxonomy, and term pages. The PublishDate
does not "roll-up".
I think the PublishDate
should roll-up to the latest date before now(). If we rolled-up dates after now(), that would cause the section, taxonomy, or term page to not be published even if there's other descendant content.
Applicable to:
Date
and PublishDate
This isn't something new (i.e., same behavior in v0.122.0).
The test case below does not test for what should happen with publish dates greater than now() as described above.
I think the PublishDate should roll-up to the latest date before now().
Yea, that sounds reasonable.
Is there a workaround that I could apply to get back the old behavior?
Or is there a chance to revert to the old behavior until a working fix is found?
Override the embedded RSS template, and change this line:
To:
<pubDate>{{ (or .PublishDate .Date).Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
If the page has a publication date, use that, else use the date.
Override the embedded RSS template [...]
Thanks, that worked.
For other readers: download the default rss.xml template to layouts/_default/rss.xml
and change the pubDate
line as shown above.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes.
Description
After upgrading to v0.125 I see changes like the following for
categories/index.xml
andtags/index.xml
files:For subindex files like
categories/foo/index.xml
thepubDate
is set to the expected value, i.e. the generated output is identical to versions < v0.125.From looking at the changelog and commit f0a26cf58e9bfbe55c091d51a4133bc22cad5d1f it's not clear to me what needs to be changed in order to retain the previous (default) selection of values for
pubDate
? Am I missing something?Also, with above hugo version
{{ hugo.Version }}
doesn't seem to be set, resulting in the following output for thegenerator
tag: