My code:
{{- with $.Param "author.name" -}}
{{- with $.Param "author.homepage" -}}
<a href="{{ $.Param "author.homepage" }}" rel="author external">
{{- end -}}
{{ $.Param "author.name" }}
{{- with $.Param "author.homepage" -}}
</a>
{{- end -}}
{{- else -}}
<a href="{{ .Site.Author.homepage }}" rel="author external">
{{ .Site.Author.name }}
</a>
{{- end -}}
stopped working, complaining about “author.name” being a string. The interesting thing is, I just changed it to this version because the documentation told me to (still searching where I found that for reference).
ERROR 2019/07/27 19:38:08 render of "taxonomy" failed:
execute of template failed:
template: _default/taxonomy.html:27:7: executing "main" at <partial "content/meta-bottom.html" .>:
error calling partial: "/home/patrick/Projects/Me/samui-samui.de/themes/dnb-hugo-garuda/layouts/partials/content/meta-bottom.html:13:24":
execute of template failed: template: partials/content/meta-bottom.html:13:24:
executing "partials/content/meta-bottom.html" at <$.Param>:
error calling Param: unsupported Params type: string
Are there any undocumented changes to the Param
handling? If so, which GitHub commits might enlighten me?
This snippet should take an author from the frontmatter, if it does not exists (default case) then uses the one from the global config.
Frontmattersample:
author:
name: Patrick Kollitsch
homepage: https://kollitsch.de
Edit: here is how this should work in the documentation: https://gohugo.io/variables/page/#access-nested-fields-in-front-matter