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