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
This commit is contained in:
parent
df1a0fd2ea
commit
994772696a
|
@ -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
|
|
@ -1,3 +1,7 @@
|
|||
<footer class="text-center mt-8 py-2 bg-gray-900 text-white">
|
||||
<div>© {{ now.Format "2006" }} {{ $.Site.Params.Name }}</div>
|
||||
{{ range .Site.Data.site.footers.siteFooter}}
|
||||
<div>
|
||||
{{.text | $.RenderString }} © {{ now.Format "2006" }} {{ $.Site.Params.Name }}
|
||||
</div>
|
||||
{{end}}
|
||||
</footer>
|
||||
|
|
Loading…
Reference in New Issue