What version of Hugo are you using (hugo version
)?
$ hugo v0.88.1-5BC54738+extended linux/amd64 BuildDate=2021-09-04T09:39:19Z VendorInfo=gohugoio
Does this issue reproduce with the latest release?
Yes
Setup:
- In
config.toml
[author]
name = "Jane Doe"
email = "jane@example.com"
homepage = "https://example.com"
avatar = "https://example.com/avatar.webp"
- Code:
<author>
<name>{{ with .Param "author.name" }}{{ . }}{{ end }}</name>
{{ with .Param "author.email" }}<email>{{ . }}</email>{{ end }}
{{ with .Param "author.homepage" }}<uri>{{ . }}</uri>{{ end }}
</author>
Or:
<p>
Name: {{ with $.Param "author.name" }}{{ . }}{{ end }}
{{ with $.Param "author.email" }}Email: {{ . }}{{ end }}
{{ with $.Param "author.homepage" }}Homepage: {{ . }}{{ end }}
</p>
If I understood correctly, .Param will look into a page’s frontmatter first and if it doesn’t find it there, it will check in the site’s config.toml
file. But it doesn’t seem to be checking the config.toml
file if it is not in a page’s frontmatter.
Did I miss anything or new bug?