mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
🐛 Fix: author display error in post and markdown file
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
{{- $author := .Site.Author | merge (dict "name" "Anonymous" "link" (echoParam $params "authorlink")) -}}
|
||||
{{- if isset $params "author" | and (ne $params.author .Site.Author.name) -}}
|
||||
{{- $author = dict "name" $params.author | merge $author -}}
|
||||
{{- $author = dict "link" (echoParam $params "authorlink") | merge $author -}}
|
||||
{{- end -}}
|
||||
# {{ .Title }}
|
||||
|
||||
{{ if $params.password -}}
|
||||
@@ -9,6 +14,6 @@
|
||||
|
||||
---
|
||||
|
||||
> {{ T "author"}}: {{ .Site.Author.name }}
|
||||
> {{ T "author"}}: {{ with $author.link }}[{{ $author.name }}]({{ . }}){{ else }}{{ $author.name }}{{ end }}
|
||||
> URL: {{ .Permalink }}
|
||||
{{ if $params.repost.enable | and (hasPrefix $params.repost.url "http") }}> {{ T "repost" }} URL: {{ $params.repost.url }}{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user