Skip to content

Commit

Permalink
Footer, copyright notice: allow customization of year (#1593)
Browse files Browse the repository at this point in the history
  • Loading branch information
deining authored Feb 2, 2024
1 parent e150a84 commit 9c3f91b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ For the full list of changes, see the [0.9.0] release notes.
renamed to `td-footer__center`. For details concerning all foot changes, see
[#1818].

- **Footer, copyright notice**:
- display of year can now be customized via .Site.Params.copyright.year
- title displayed after year must now be given via
.Site.Params.copyright.title

**Other changes**:

- The latest release of [Mermaid] resources are fetched at build time ([#1410]).
Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/footer/copyright.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{{ with .Site.Params.copyright -}}
<span class="td_footer__copyright">&copy; {{ now.Year }} {{ . }} {{ T "footer_all_rights_reserved" }}</span>
<span class="td_footer__copyright">&copy; {{ with .year -}}{{- . -}}{{- else -}}{{- now.Year -}}{{- end }} {{ with .title -}}{{- . -}}{{- end }} {{ T "footer_all_rights_reserved" }}</span>
{{- else }}
{{ with .Site.Copyright }}{{ . | safeHTML }}{{ end }}
{{- end -}}
4 changes: 3 additions & 1 deletion userguide/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ markup:
style: tango

params:
copyright: The Docsy Authors
copyright:
title: The Docsy Authors
year: 2024
privacy_policy: https://policies.google.com/privacy
version_menu: Releases
archived_version: false
Expand Down

0 comments on commit 9c3f91b

Please sign in to comment.