mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-02-17 09:10:08 +00:00
config: warings only for Hugo >= 0.120.0 #693
This commit is contained in:
parent
c893eb5147
commit
9829156c6d
2 changed files with 19 additions and 13 deletions
|
@ -6,8 +6,11 @@
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- with .Site.Author.email }}
|
{{- with .Site.Author.email }}
|
||||||
{{- $authorEmail = . }}
|
{{- $authorEmail = . }}
|
||||||
|
{{- $hugoVersion := "0.120.0" }}
|
||||||
|
{{- if ge hugo.Version $hugoVersion }}
|
||||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
{{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}}
|
||||||
|
|
|
@ -11,7 +11,10 @@
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- with .Site.Author.name }}
|
{{- with .Site.Author.name }}
|
||||||
{{- $authorName = . }}
|
{{- $authorName = . }}
|
||||||
|
{{- $hugoVersion := "0.120.0" }}
|
||||||
|
{{- if ge hugo.Version $hugoVersion }}
|
||||||
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- return $authorName }}
|
{{- return $authorName }}
|
Loading…
Add table
Reference in a new issue