Skip to content

Commit

Permalink
Footer, copyright notice: allow customization of year
Browse files Browse the repository at this point in the history
Closes #1592
  • Loading branch information
deining committed Jun 28, 2023
1 parent d16e0da commit ce7c170
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 @@ -17,6 +17,11 @@ For a list of issues targeted for the next release, see the [23Q2][] milestone.
**Other changes**:

## [0.7.1][]
**Breaking changes**:

- **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

Followup changes to **Bootstrap (BS) 5.2 upgrade** ([#470]):

Expand Down
4 changes: 3 additions & 1 deletion layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
</div>
<div class="td-footer__copyright-etc col-12 col-sm-4 text-center py-2 order-sm-2">
{{ with .Site.Params.copyright -}}
<span>&copy; {{ now.Year }} {{ . }} {{ T "footer_all_rights_reserved" }}</span>
<span>&copy; {{ with .year -}}{{- . -}}{{- else -}}{{- now.Year -}}{{- end }} {{ with .title -}}{{- . -}}{{- end }} {{ T "footer_all_rights_reserved" }}</span>
{{- else }}
{{ with .Site.Copyright }}{{ . | safeHTML }}{{ end }}
{{- end }}
{{ with .Site.Params.privacy_policy -}}
<span class="ms-1"><a href="{{ . }}" target="_blank" rel="noopener">{{ T "footer_privacy_policy" }}</a></span>
Expand Down
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: 2023
privacy_policy: https://policies.google.com/privacy
version_menu: Releases
archived_version: false
Expand Down

0 comments on commit ce7c170

Please sign in to comment.