1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-12-30 12:02:09 +00:00
seirdy.one/layouts/partials/processed-content.html

11 lines
430 B
HTML
Raw Normal View History

{{ if .Params.footnote_heading -}}
{{ $references := `(<section class="footnotes" role="doc-endnotes">
<hr>)` -}}
{{ $heading := .Params.footnote_heading -}}
2021-01-19 00:25:59 +00:00
{{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labelledby="note-hd">
<h2 id="note-hd">%s</h2>` ($heading) -}}
{{ .Content | replaceRE $references $referencesWithHeading | safeHTML -}}
{{ else -}}
{{ .Content -}}
{{ end -}}