Merge pull request #39 from ntzwrk/feature/license-url

Add feature for 3rd party license URLs
This commit is contained in:
Alexis Tacnet
2017-06-11 21:51:31 +02:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -19,6 +19,7 @@ dateform = "Jan 2, 2006"
dateformfull = "Mon Jan 2 2006 15:04:05 MST" dateformfull = "Mon Jan 2 2006 15:04:05 MST"
description = "Example blog" description = "Example blog"
copyright = "Copyright © 2015 Nishanth Shanmugham" copyright = "Copyright © 2015 Nishanth Shanmugham"
# copyrightUrl = "https://creativecommons.org/licenses/by-sa/4.0/"
logofile = "img/logo.png" logofile = "img/logo.png"
faviconfile = "img/logo.png" faviconfile = "img/logo.png"
highlightjs = true highlightjs = true

View File

@@ -3,7 +3,11 @@
<div class="copyright"> <div class="copyright">
{{ if .Site.Params.copyright }} {{ if .Site.Params.copyright }}
<a href="{{ .Site.BaseURL }}license">{{ .Site.Params.copyright}}</a> {{ if .Site.Params.copyrightUrl }}
<a href="{{ .Site.Params.copyrightUrl }}">{{ .Site.Params.copyright }}</a>
{{ else }}
<a href="{{ .Site.BaseURL }}license">{{ .Site.Params.copyright }}</a>
{{ end }}
{{ end }} {{ end }}
</div> </div>