diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2024-09-29 15:54:01 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <git@serghei.pl> | 2024-09-29 18:15:42 +0200 |
| commit | 0882a21997b0830f43643cac9f0de4beaa698988 (patch) | |
| tree | 581a1dea498805ef5b9259fbf095b5546d705a78 /layouts/partials/site-author.html | |
| parent | ec19cd59b5fc2ee4dc12b65647099c595984c075 (diff) | |
| download | gohugo-theme-ed-0882a21997b0830f43643cac9f0de4beaa698988.tar.gz | |
Rework author configuration
Diffstat (limited to 'layouts/partials/site-author.html')
| -rw-r--r-- | layouts/partials/site-author.html | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/layouts/partials/site-author.html b/layouts/partials/site-author.html deleted file mode 100644 index cd6dbf4..0000000 --- a/layouts/partials/site-author.html +++ /dev/null @@ -1,35 +0,0 @@ -{{- /* - -This partial is used to get the site author information. - -In Hugo v0.124.0, the site.Author variable was deprecated. Instead, it is recommended to use -the "author" parameters in the site configuration file. - -This partial checks for the presence of author information in both site.Author and site.Params.author. -If both are present, preference is given to site.Params.author. - -The result is stored in the $siteAuthor variable and returned by the partial. - -Usage: - - {{ $siteAuthor := partial "site-author.html" . }} - - {{ with $siteAuthor.name }} {{ . }} {{ end }} - {{ with $siteAuthor.email }} {{ . }} {{ end }} - {{ with $siteAuthor.github }} {{ . }} {{ end }} - {{ with $siteAuthor.twitter }} {{ . }} {{ end }} - {{ with $siteAuthor.location }} {{ . }} {{ end }} - -For more information, see: https://github.com/gohugoio/hugo/releases/tag/v0.124.0 -*/ -}} - -{{- $siteAuthor := dict "name" "" "email" "" "github" "" "twitter" "" "location" "" -}} - -{{- if site.Params.author -}} - {{- $siteAuthor = merge $siteAuthor site.Params.author -}} -{{- else if site.Author -}} - {{- $siteAuthor = merge $siteAuthor site.Author -}} - {{- warnf "The author key in site configuration is deprecated. Use site.params.author instead." }} -{{- end -}} - -{{- return $siteAuthor -}} |
