add .Site.Params.since

.Site.Params.since is an option to store the year site development
started:
(c) 2019 - 2020
This commit is contained in:
Evgeny Kuznetsov 2020-03-16 21:53:06 +03:00
parent b7e068d587
commit 4a676a26d2
No known key found for this signature in database
GPG key ID: 79B2B092A63F5E6F
2 changed files with 2 additions and 1 deletions

View file

@ -24,6 +24,7 @@ theme = "hyde-hyde"
# sidebar, copyright & license # sidebar, copyright & license
copyright = "htr3n" copyright = "htr3n"
since = 2019
license = "CC BY-SA 4.0" license = "CC BY-SA 4.0"
licenseURL = "https://creativecommons.org/licenses/by-sa/4.0" licenseURL = "https://creativecommons.org/licenses/by-sa/4.0"
showBuiltWith = true showBuiltWith = true

View file

@ -1,6 +1,6 @@
{{ with .Site.Params.copyright }} {{ with .Site.Params.copyright }}
<div class="copyright"> <div class="copyright">
&copy; {{ now.Format "2006"}} {{ . | safeHTML }} &copy; {{ with $.Site.Params.since }}{{ if lt . now.Year }}{{ . | safeHTML }} - {{ end }}{{ end }}{{ now.Format "2006"}} {{ . | safeHTML }}
{{ with $.Site.Params.license }} {{ with $.Site.Params.license }}
<a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a> <a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a>
{{end}} {{end}}