From 31d581de0c094e90862e70f42fe4dc48b39053da Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Fri, 18 Feb 2022 13:33:27 -0800 Subject: [PATCH] Add copyright year ranges --- config.toml | 1 + layouts/partials/footers/submissions.html | 2 +- themes/tegakituesday.com/layouts/partials/copyright-years.html | 1 + themes/tegakituesday.com/layouts/partials/footers/main.html | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 themes/tegakituesday.com/layouts/partials/copyright-years.html diff --git a/config.toml b/config.toml index 591b131..99783b5 100644 --- a/config.toml +++ b/config.toml @@ -10,6 +10,7 @@ disableKinds = ["taxonomy", "taxonomyTerm", "RSS"] FontAwesomeKit = "c3c3b565dc" MatomoURL = "matomo.elnu.com" MatomoSiteId = "4" + CopyrightStart = 2021 [permalinks] challenges = "/:filename" diff --git a/layouts/partials/footers/submissions.html b/layouts/partials/footers/submissions.html index ce294e4..22f860e 100644 --- a/layouts/partials/footers/submissions.html +++ b/layouts/partials/footers/submissions.html @@ -1,3 +1,3 @@
-Submissions are copyright © {{ dateFormat "2006" now }} their respective submitters, and are licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. \ No newline at end of file +Submissions are copyright © {{ partial "copyright-years.html" . }} their respective submitters, and are licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license. \ No newline at end of file diff --git a/themes/tegakituesday.com/layouts/partials/copyright-years.html b/themes/tegakituesday.com/layouts/partials/copyright-years.html new file mode 100644 index 0000000..c447771 --- /dev/null +++ b/themes/tegakituesday.com/layouts/partials/copyright-years.html @@ -0,0 +1 @@ +{{ if ne (dateFormat "2006" now | int) .Site.Params.CopyrightStart }}{{ .Site.Params.CopyrightStart }}–{{ end }}{{ dateFormat "2006" now }} \ No newline at end of file diff --git a/themes/tegakituesday.com/layouts/partials/footers/main.html b/themes/tegakituesday.com/layouts/partials/footers/main.html index c07008c..66a3b35 100644 --- a/themes/tegakituesday.com/layouts/partials/footers/main.html +++ b/themes/tegakituesday.com/layouts/partials/footers/main.html @@ -1,2 +1,2 @@ -Copyright © {{ dateFormat "2006" now }} {{ .Site.Title }}. All rights reserved.
+Copyright © {{ partial "copyright-years.html" . }} {{ .Site.Title }}. All rights reserved.
Site last regenerated with Hugo at {{ partial "time.html" (dict "Date" now) }}. \ No newline at end of file