Comments (3)
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 #12300 (comment). We should have closed #11692 as "won't fix".
I'll look into the zero pubdate problem.
from hugo.
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:
- Automatic section, taxonomy, and term pages
- Section, taxonomy, and term pages without
Date
andPublishDate
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.
Failing test
func TestFoo(t *testing.T) {
t.Parallel()
files := `
-- hugo.toml --
disableKinds = ['home','rss','sitemap']
[taxonomies]
tag = 'tags'
-- layouts/_default/list.html --
Date: {{ .Date.Format "2006-01-02" }}
PublishDate: {{ .PublishDate.Format "2006-01-02" }}
Lastmod: {{ .Lastmod.Format "2006-01-02" }}
-- layouts/_default/single.html --
{{ .Title }}
-- content/s1/p1.md --
---
title: p1
date: 2024-03-01
lastmod: 2024-03-02
tags: [t1]
---
-- content/s1/p2.md --
---
title: p2
date: 2024-04-03
lastmod: 2024-04-04
tags: [t1]
---
`
// Test without publishDate in front matter.
b := hugolib.Test(t, files)
b.AssertFileContent("public/s1/index.html", `
Date: 2024-04-03
PublishDate: 2024-04-03
Lastmod: 2024-04-04
`)
b.AssertFileContent("public/tags/index.html", `
Date: 2024-04-03
PublishDate: 2024-04-03
Lastmod: 2024-04-04
`)
b.AssertFileContent("public/tags/t1/index.html", `
Date: 2024-04-03
PublishDate: 2024-04-03
Lastmod: 2024-04-04
`)
// Test with publishDate in front matter.
files = strings.ReplaceAll(files, "lastmod", "publishDate")
b = hugolib.Test(t, files)
b.AssertFileContent("public/s1/index.html", `
Date: 2024-04-03
PublishDate: 2024-04-03
Lastmod: 2024-04-03
`)
b.AssertFileContent("public/tags/index.html", `
Date: 2024-04-03
PublishDate: 2024-04-03
Lastmod: 2024-04-03
`)
b.AssertFileContent("public/tags/t1/index.html", `
Date: 2024-04-03
PublishDate: 2024-04-03
Lastmod: 2024-04-03
`)
}
from hugo.
I think the PublishDate should roll-up to the latest date before now().
Yea, that sounds reasonable.
from hugo.
Related Issues (20)
- Possible infinite loop in Hugo Modules download
- Error in message when deleting a folder in `layouts`
- Apache license is not meant to be modified HOT 1
- Twitter `og:description` doubly escaped by Hugo 0.125.x HOT 6
- Output folder of rendered images of AsciiDoctor Diagram extension HOT 2
- Sign Binary Releases For Verification? HOT 2
- Public site building simultaneously HOT 3
- XMPP: Post to PubSub HOT 1
- Rendering Issue caused by `<!--more-->` HOT 2
- Create pages from _content.gotmpl HOT 15
- The /docs merge creates empty commits HOT 2
- tpl/tplimpl: Plainify title and description in schema.html HOT 2
- tpl/tplimpl: Plainify title and description in twitter_cards.html HOT 1
- Page does not reload after modifying a different page HOT 3
- Error suppressed while running server unless browser is open HOT 3
- Please add SLSA provenance to your releases HOT 5
- Broken image sources with base64 encoded images HOT 2
- Update from 0.111.3 to 0.124.1 breaks site HOT 1
- echo "bar" >> content/about/index.md% panics
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo.