Introduce options to configure footer text

In site config =>
params:
  footer:
    text: "This is footer text - markdown suported"
    hideCopyright: true

closes: #1481
This commit is contained in:
Aditya Telange 2024-04-13 13:51:54 +05:30
parent 74ceb5efc5
commit 28b86cb5a6
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
1 changed files with 13 additions and 4 deletions

View File

@ -1,10 +1,19 @@
{{- if not (.Param "hideFooter") }}
<footer class="footer">
{{- if site.Copyright }}
<span>{{ site.Copyright | markdownify }}</span>
{{- else }}
<span>&copy; {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ site.Title }}</a></span>
{{- if not site.Params.footer.hideCopyright }}
{{- if site.Copyright }}
<span>{{ site.Copyright | markdownify }}</span>
{{- else }}
<span>&copy; {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ site.Title }}</a></span>
{{- end }}
{{- print " · "}}
{{- end }}
{{- with site.Params.footer.text }}
{{ . | markdownify }}
{{- print " · "}}
{{- end }}
<span>
Powered by
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &