Fix bug in author params code, reported in issue #117.

This commit is contained in:
Fredrik Jonsson 2024-11-06 15:27:51 +01:00
commit a1e9b05dcc

View file

@ -1,3 +1,3 @@
{{ with $.Param "author" | default site.Params.author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date (or ($.Param "author") site.Params.author.name) }} - {{ end -}}
{{ with .Params.author | default site.Params.author.name }}<span class="author" itemprop="author">{{ . }}</span>{{ end -}}
{{ if and .Date (or .Params.author site.Params.author.name) }} - {{ end -}}
{{ with .Date }}<time class="created-date" datetime="{{ .Format "2006-01-02T15:04:05Z07:00" }}">{{ .Format ($.Param "dateformat" | default "2 January, 2006") }}</time>{{ end }}