diff options
author | Huy Tran <hoang.huy.tran@gmail.com> | 2020-03-23 11:49:10 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-23 11:49:10 +0300 |
commit | c02a791197c93c8d3e3b8434aadf4d3d41534489 (patch) | |
tree | afe16237593886dee7cd9a82977a95772b213bdc | |
parent | 0bceeefdf5bc57783402db5ed7afe5c55dd5ab27 (diff) | |
parent | 4a676a26d23b15c16d55ae18580f3c88ec152a08 (diff) |
Merge pull request #110 from nekr0z/copyright-since
add .Site.Params.since
-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}} |