From 0745285e71506b8fab80ac4d6bcdaa9e25e34ced Mon Sep 17 00:00:00 2001 From: Jimmy Cai Date: Sun, 6 Sep 2020 13:58:21 +0200 Subject: [PATCH] feat(config.toml): change config structure for article license --- exampleSite/config.toml | 4 +++- layouts/partials/article/components/footer.html | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 6803c0d..49be3c8 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -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] diff --git a/layouts/partials/article/components/footer.html b/layouts/partials/article/components/footer.html index 39fc8d8..39d5b58 100644 --- a/layouts/partials/article/components/footer.html +++ b/layouts/partials/article/components/footer.html @@ -7,10 +7,10 @@ {{ end }} - {{ if .Site.Params.article.defaultLicense }} + {{ if .Site.Params.article.license.enabled }}
{{ (resources.Get "icons/copyright.svg").Content | safeHTML }} - {{ .Site.Params.article.defaultLicense }} + {{ .Site.Params.article.license.default }}
{{ end }} \ No newline at end of file