Merge pull request #110 from nekr0z/copyright-since

add .Site.Params.since
This commit is contained in:
Huy Tran 2020-03-23 19:49:10 +11:00 committed by GitHub
commit c02a791197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

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

View File

@ -1,6 +1,6 @@
{{ with .Site.Params.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 }}
<a href="{{$.Site.Params.licenseURL | safeHTML}}">{{ . | safeHTML }}</a>
{{end}}