I’m seeing a date on a page affect the sort order of a tag that page has in the tag taxonomy.
I have pages _index.md, a.md, and b.md in content/ with tags I, A, and B respectively. When no page has a date, the tags are listed at URL /tags/ in alphabetical order A, B, I, as expected, but when I add a date to b.md, then I see order B, I, A.
I don’t understand this behavior. There is no tag page like content/tags/b/_index.md, so the page for the B tag can’t have a date. No weights are used. That means the default sorting should be using the titles, right?
Regardless of what’s going on with b.md and the B tag, why is the I tag listed before the A tag now too?
Is this somehow related to that breaking change that made list pages inherit the date of its latest page? Again, if so, how does that explain the order of the I and A tags?
Thanks for any help!
Using: hugo v0.143.1+extended+withdeploy darwin/arm64 BuildDate=2025-02-04T08:57:38Z VendorInfo=brew
hugo.toml:
baseURL = 'https://example.org/'
languageCode = 'en-us'
title = 'My New Hugo Site'
[taxonomies]
tag = "tags"
content/_index.md:
---
title: I
tags: [i]
---
I
content/a.md:
---
title: A
tags: [a]
---
A
content/b.md:
---
date: "2023-09-18T20:21:05-07:00"
title: B
tags: [b]
---
B
layouts/_default/baseof.html:
<html>
<body>
{{ block "main" $page }}{{ end }}
</body>
</html>
layouts/_default/list.html, layouts/_default/taxonomy.html, layouts/_default/term.html:
{{ range .Pages }}
{{ .Title }}
{{ end }}
layouts/_default/single.html:
{{.Title}} - {{.Content}}