2023-10-20 18:08:37 +00:00
{{- $authorName := "" }}
{{- if .Site.Params.author }}
2023-10-20 18:15:52 +00:00
{{- if reflect.IsMap .Site.Params.author }}
{{- with .Site.Params.author.name }}
{{- $authorName = . }}
{{- end }}
{{- else }}
2023-10-27 22:36:30 +00:00
{{- warnf "%q: DEPRECATED usage of 'params.author' config parameter found, replace it with `params.author.name` in your config.toml; see https://mcshelby.github.io/hugo-theme-relearn/basics/migration/#5230" .File.Filename }}
2023-10-20 18:15:52 +00:00
{{- $authorName = .Site.Params.author }}
{{- end }}
2023-10-20 18:08:37 +00:00
{{- else }}
2023-10-20 18:15:52 +00:00
{{- with .Site.Author.name }}
{{- $authorName = . }}
{{- $hugoVersion := "0.120.0" }}
{{- if ge hugo.Version $hugoVersion }}
{{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }}
{{- end }}
{{- end }}
2023-10-20 18:08:37 +00:00
{{- end }}
{{- return $authorName }}