feat(config.toml): change config structure for article license

This commit is contained in:
Jimmy Cai 2020-09-06 13:58:21 +02:00
parent 52a9ec9825
commit 0745285e71
No known key found for this signature in database
GPG Key ID: 3EA408E527F37B18
2 changed files with 5 additions and 3 deletions

View File

@ -16,7 +16,9 @@ title = "Example Site"
avatar = "img/avatar.png"
subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
[params.article]
defaultLicense = "Licenced under CC BY-NC-SA 4.0"
[params.article.license]
enabled = true
default = "Licenced under CC BY-NC-SA 4.0"
[params.widgets]
enabled = ['archive', 'tag-cloud']
[params.widgets.archive]

View File

@ -7,10 +7,10 @@
</section>
{{ end }}
{{ if .Site.Params.article.defaultLicense }}
{{ if .Site.Params.article.license.enabled }}
<section class="article-copyright">
{{ (resources.Get "icons/copyright.svg").Content | safeHTML }}
<span>{{ .Site.Params.article.defaultLicense }}</span>
<span>{{ .Site.Params.article.license.default }}</span>
</section>
{{ end }}
</footer>