Generate copyright date from .Lastmod for non-homepage indexes such as /blog/ etc

Any combination of .Page.Parent.something I try throws up the date for .Date rather than for .Lastmod. I conclude from this that the reason is how .Lastmod and .Date are set by Hugo and how they relate to each other. As I understand, in Go one accesses publish date and last modified date in one of the two following ways:

  1. editor-controlled via front-matter in Markdown;

  2. automatically extracted from git.

I didn’t want to have to manually update the last modified date in my front matter every time I amended a page, so I didn’t bother to include it, and I use a text editor client to write new posts, so archetypes aren’t relevant to my workflow for new content.

1. In config.toml, I have:

[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = ["lastmod", "date", "publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]

2. .Lastmod isn’t set in my front matter. No longer pulling it from :git (an idea I originally got here), as we decided to do earlier, solved the issue for the section pages, but it now means I have no way of targeting the .Lastmod in the /legal section.

In other words, I’ve got myself in a configuration in which, when I ask Hugo to display lastmod, it displays date instead.

I tried adding lastmod: ":git" to the two /legal section pages’ front matter, but that didn’t work.

And adding lastmod = [":fileModTime", “:default”] to config.toml, which I saw suggested here, doesn’t work either.

In fact, even hard-coding lastmod: 2023-05-26T03:20:07+00:00 to their front matter still displays the date!

Yet bizarrely, the following partial works, as you can see on the tope of the terms and privacy pages, at the top of which it correctly generates lastmod providing it is set to ['lastmod', ':fileModTime', ':default'] in the front matter, using :

<span
  >&thinsp;{{ .Lastmod.Format "2" | humanize }} {{ .Lastmod.Format "January" }},
  {{ .Lastmod.Format "2006" }}</span
>

and despite displaying date rather than lastmod in the footer using this code, on the same page:

{{ else if or (eq .Section "legal") (eq .Params.slug "terms") (eq .Params.slug "privacy") }}
  {{ .Lastmod.Format "2006" }}

I’m guessing the solution is to set separate [frontmatter] defaults for that section. Right?