From e1782cd20471173696cc1a5223be4123c8b66f9c Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sun, 1 Jan 2023 17:56:40 +0300 Subject: [PATCH] feat(index): 2023 & footer links --- config.toml | 11 +++++++++-- layouts/partials/footer.html | 13 +++++++++---- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/config.toml b/config.toml index 3614ddc..680c487 100644 --- a/config.toml +++ b/config.toml @@ -9,9 +9,16 @@ staticDir = ["static"] favicon = "favicon.ico" # path to a .ico to use as favicon # logo = "logo.svg" [params.footer] - text = "Pavel Korytov, 2022" - license = "Licensed under CC-BY 4.0" + text = "Pavel Korytov, 2023" + license = "" licenseURL = "https://creativecommons.org/licenses/by/4.0/legalcode" + [[params.footer.links]] + text = "Licensed under CC-BY 4.0" + url = "https://creativecommons.org/licenses/by/4.0/legalcode" + [[params.footer.links]] + text = "Uses Plausible Analytics" + url = "https://plausible.io/" + mainSections = ['posts'] [permalinks] diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f9a2935..cf8facf 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -7,11 +7,16 @@ {{ with .Site.Params.footer }}
- {{ .text | safeHTML }} - {{ if .license }} -
- {{ .license }} + {{ if .links }} + {{ range $i, $item := .links }} + {{ $item.text }} + {{ if not (eq $i (sub (len $.Site.Params.footer.links) 1)) }} + | {{ end }} + {{ end }} +
+ {{ end }} + {{ .text | safeHTML }}
{{ end }}