mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-25 03:51:37 +01:00
[PATCH] tpl/tplimpl: Fix deprecation logic in RSS template
cherry-pick from 23fcfb7f74
This commit is contained in:
parent
00488d0146
commit
ff7443b17f
@ -1,7 +1,11 @@
|
|||||||
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}}
|
||||||
{{- $authorEmail := "" }}
|
{{- $authorEmail := "" }}
|
||||||
{{- with site.Params.author.email }}
|
{{- with site.Params.author }}
|
||||||
|
{{- if reflect.IsMap . }}
|
||||||
|
{{- with .email }}
|
||||||
{{- $authorEmail = . }}
|
{{- $authorEmail = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- with site.Author.email }}
|
{{- with site.Author.email }}
|
||||||
{{- $authorEmail = . }}
|
{{- $authorEmail = . }}
|
||||||
@ -11,8 +15,14 @@
|
|||||||
|
|
||||||
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
||||||
{{- $authorName := "" }}
|
{{- $authorName := "" }}
|
||||||
{{- with site.Params.author.name }}
|
{{- with site.Params.author }}
|
||||||
|
{{- if reflect.IsMap . }}
|
||||||
|
{{- with .name }}
|
||||||
{{- $authorName = . }}
|
{{- $authorName = . }}
|
||||||
|
{{- end }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $authorName = . }}
|
||||||
|
{{- end }}
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- with site.Author.name }}
|
{{- with site.Author.name }}
|
||||||
{{- $authorName = . }}
|
{{- $authorName = . }}
|
||||||
|
Loading…
Reference in New Issue
Block a user