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

19 lines
649 B
HTML
Raw Normal View History

{{ if .Params.footnote_heading -}}
{{ $references := `(<section class="footnotes" role="doc-endnotes">
<hr>)` -}}
{{ $heading := .Params.footnote_heading -}}
2022-04-07 00:49:25 +00:00
{{ $referencesWithHeading := printf `<section role="doc-endnotes" aria-labelledby="note-hd">
<h2 id="note-hd">%s</h2>` ($heading) -}}
{{ $endnote := `(role="doc-endnote")` }}
{{ $noEndnote := printf "" }}
2022-04-07 00:49:25 +00:00
{{ $preWithTabIndex := `<pre tabindex="0">` }}
{{ $preWithoutTabIndex := `<pre>` }}
{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | replaceRE $preWithTabIndex $preWithoutTabIndex | safeHTML -}}
{{ else -}}
{{ .Content -}}
{{ end -}}