mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +00:00
Allow adding a heading to the endnotes section
This commit is contained in:
parent
59b12ee290
commit
4d297de4ea
3 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,7 @@ tags:
|
||||||
- security
|
- security
|
||||||
- fun
|
- fun
|
||||||
title: Becoming physically immune to brute-force attacks
|
title: Becoming physically immune to brute-force attacks
|
||||||
|
footnote_heading: References and endnotes
|
||||||
---
|
---
|
||||||
|
|
||||||
This is a tale of the intersection between thermal physics, cosmology, and a tiny
|
This is a tale of the intersection between thermal physics, cosmology, and a tiny
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</header>
|
</header>
|
||||||
<section class="e-content" itemprop="articlebody">
|
<section class="e-content" itemprop="articlebody">
|
||||||
{{ .Content -}}
|
{{ partial "processed-content" . -}}
|
||||||
</section>
|
</section>
|
||||||
</article>
|
</article>
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{ if .Params.footnote_heading -}}
|
||||||
|
{{ $references := `(<section class="footnotes" role="doc-endnotes")` -}}
|
||||||
|
{{ $heading := .Params.footnote_heading -}}
|
||||||
|
{{ $referencesWithHeading := printf `${1} aria-labeledby="note-hd">
|
||||||
|
<h2 id="note-hd">%s</h2` ($heading) -}}
|
||||||
|
{{ .Content | replaceRE $references $referencesWithHeading | safeHTML -}}
|
||||||
|
{{ end -}}
|
Loading…
Reference in a new issue