Force render the copyright string to Markdown

This commit is contained in:
Gabriel Arazas 2022-11-22 19:45:45 +08:00
parent 961953ed12
commit 94c3907832

View File

@ -1,6 +1,6 @@
<footer aria-label="Site footer"> <footer aria-label="Site footer">
<!-- A convenient back to top link. --> <!-- A convenient back to top link. -->
<p><a href="#top">{{ i18n "back_to_top" | default "Back to top" }}</a></p> <a href="#top">{{ i18n "back_to_top" | default "Back to top" }}</a>
<!-- Linking to other languages' homepage. --> <!-- Linking to other languages' homepage. -->
{{ if $.Site.IsMultiLingual }} {{ if $.Site.IsMultiLingual }}
@ -35,8 +35,9 @@
</ul> </ul>
{{ end }} {{ end }}
{{ $markdownOpt := dict "markup" "markdown" }}
<!-- Copyright info. --> <!-- Copyright info. -->
<p>{{ with $.Site.Copyright }}{{ . | markdownify }}{{ else }}© {{ now.Year }} {{ with $.Site.Author.name }}{{ . }}{{ else }}{{ $.Site.Title }}{{ end }}{{ end }}</p> <p>{{ with $.Site.Copyright }}{{ . | $.Site.RenderPage $markdownOpt }}{{ else }}© {{ now.Year }} {{ with $.Site.Author.name }}{{ . }}{{ else }}{{ $.Site.Title }}{{ end }}{{ end }}</p>
</footer> </footer>