Skip to content

Commit

Permalink
Introduce options to configure footer text
Browse files Browse the repository at this point in the history
In site config =>
params:
  footer:
    text: "This is footer text - markdown suported"
    hideCopyright: true

closes: #1481
  • Loading branch information
adityatelange committed Apr 13, 2024
1 parent 74ceb5e commit 28b86cb
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -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> &
Expand Down

0 comments on commit 28b86cb

Please sign in to comment.