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" avatar = "img/avatar.png"
subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit." subtitle = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
[params.article] [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] [params.widgets]
enabled = ['archive', 'tag-cloud'] enabled = ['archive', 'tag-cloud']
[params.widgets.archive] [params.widgets.archive]

View File

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