diff options
author | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2020-03-16 21:53:06 +0300 |
---|---|---|
committer | Evgeny Kuznetsov <evgeny@kuznetsov.md> | 2020-03-16 21:53:06 +0300 |
commit | 4a676a26d23b15c16d55ae18580f3c88ec152a08 (patch) | |
tree | 8e048458b3f92ad393732cd52d0c1c3fb3ece27d | |
parent | b7e068d587da374239a53d8fbb7df7990b1376db (diff) |
add .Site.Params.since
.Site.Params.since is an option to store the year site development
started:
(c) 2019 - 2020
-rw-r--r-- | exampleSite/config.toml | 1 | ||||
-rw-r--r-- | layouts/partials/sidebar/copyright.html | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 05db08a..5565cd3 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -24,6 +24,7 @@ theme = "hyde-hyde" # sidebar, copyright & license copyright = "htr3n" + since = 2019 license = "CC BY-SA 4.0" licenseURL = "https://creativecommons.org/licenses/by-sa/4.0" showBuiltWith = true diff --git a/layouts/partials/sidebar/copyright.html b/layouts/partials/sidebar/copyright.html index e9227d8..b3c4d0c 100644 --- a/layouts/partials/sidebar/copyright.html +++ b/layouts/partials/sidebar/copyright.html @@ -1,6 +1,6 @@ {{ with .Site.Params.copyright }} <div class="copyright"> - © {{ now.Format "2006"}} {{ . | safeHTML }} + © {{ with $.Site.Params.since }}{{ if lt . now.Year }}{{ . | safeHTML }} - {{ end }}{{ end }}{{ now.Format "2006"}} {{ . | safeHTML }} {{ with $.Site.Params.license }} <a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a> {{end}} |