1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-09-19 20:02:10 +00:00

Allow adding a heading to the endnotes section

This commit is contained in:
Rohan Kumar 2021-01-17 17:18:02 -08:00
parent 59b12ee290
commit 4d297de4ea
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
3 changed files with 9 additions and 1 deletions

View file

@ -9,6 +9,7 @@ tags:
- security
- fun
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

View file

@ -12,7 +12,7 @@
{{ end }}
</header>
<section class="e-content" itemprop="articlebody">
{{ .Content -}}
{{ partial "processed-content" . -}}
</section>
</article>
<br>

View file

@ -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 -}}