Skip to content

Commit 8cd349f

Browse files
committed
Footer, copyright notice: allow customization of year
Closes #1592
1 parent e150a84 commit 8cd349f

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ For the full list of changes, see the [0.9.0] release notes.
4848
renamed to `td-footer__center`. For details concerning all foot changes, see
4949
[#1818].
5050

51+
- **Footer, copyright notice**:
52+
- display of year can now be customized via .Site.Params.copyright.year
53+
- title displayed after year must now be given via .Site.Params.copyright.title
54+
5155
**Other changes**:
5256

5357
- The latest release of [Mermaid] resources are fetched at build time ([#1410]).
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{{ with .Site.Params.copyright -}}
2-
<span class="td_footer__copyright">&copy; {{ now.Year }} {{ . }} {{ T "footer_all_rights_reserved" }}</span>
2+
<span class="td_footer__copyright">&copy; {{ with .year -}}{{- . -}}{{- else -}}{{- now.Year -}}{{- end }} {{ with .title -}}{{- . -}}{{- end }} {{ T "footer_all_rights_reserved" }}</span>
3+
{{- else }}
4+
{{ with .Site.Copyright }}{{ . | safeHTML }}{{ end }}
35
{{- end -}}

userguide/hugo.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ markup:
5050
style: tango
5151

5252
params:
53-
copyright: The Docsy Authors
53+
copyright:
54+
title: The Docsy Authors
55+
year: 2024
5456
privacy_policy: https://policies.google.com/privacy
5557
version_menu: Releases
5658
archived_version: false

0 commit comments

Comments
 (0)