Skip to content

Commit 061ef25

Browse files
committed
Footer copyright default to site title for authors
1 parent c074d68 commit 061ef25

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ For details concerning all footer changes, see [#1818].
6161
- Hugo config option `params.copyright`, previously a string, can now also be
6262
a map with the following optional fields: `authors`, `from_year`, `to_year`.
6363
When unset, `to_year` defaults to the year that the site built. The default
64-
`authors` is "Site Authors" and this field is rendered as markdown.
64+
`authors` is "<Site.Title> Authors" and this field is rendered as markdown.
6565
- If `params.copyright` is unset, then the [site `copyright`] option will be
6666
used and rendered as markdown, "as is" &mdash; with no year is added.
6767

layouts/partials/footer/copyright.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
{{- end -}}
1818
{{ $toYear | default now.Year }}
1919
<span class="td-footer__authors">
20-
{{- $authors | default "Site Authors" | $page.RenderString -}}
20+
{{- $authors
21+
| default (printf "%s Authors" ($.Site.Title | default "Site"))
22+
| $page.RenderString -}}
2123
</span>
2224
{{- /* Trim WS */ -}}
2325
</span>

0 commit comments

Comments
 (0)