From 994772696ae9bd3843b8a4660e56a4e26759e8b5 Mon Sep 17 00:00:00 2001 From: f-dinucci Date: Tue, 31 May 2022 00:29:40 +0200 Subject: [PATCH] feat[footer]: allow footer customization A part of the footer (copyright/author/date) is hardcoded, while the other part is loaded from a TOML (included in example site) and rendered through .RenderString Closes: #8 --- exampleSite/data/site/footers.toml | 4 ++++ layouts/partials/footer.html | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 exampleSite/data/site/footers.toml diff --git a/exampleSite/data/site/footers.toml b/exampleSite/data/site/footers.toml new file mode 100644 index 0000000..f6fa29b --- /dev/null +++ b/exampleSite/data/site/footers.toml @@ -0,0 +1,4 @@ +# Common footer to use site-wide +[[siteFooter]] + text = "Powered by [Hugo](https://gohugo.io/) with [Simple Intro theme](https://github.com/qub1750ul/hugo-simpleIntro) - " +# More footers could be defined to be used in specific pages/layouts diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index fb50194..a815073 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,3 +1,7 @@