Hugo Shortcode for (inline) Footnotes
My Problem: inline explanations and annotations, no JavaScript (just because)
My Solution: create a shortcode for footnotes; toggled entirely with CSS; using state of HTML checkbox toggling the label via CSS
|
|
The respective styles are (SCSS):
|
|
The shortcode is used like this in the content .md-files:
...
Mine even works perfectly fine over the WLAN.{{<footnote>}}I *plan* to lay a cable, though.{{</footnote>}}
...
The result looks like this:
…
Mine even works perfectly fine over the WLAN.
…
To expand the footnote, click on the *. Because the footnote.html
pipes its text content through
markdownify
in line 7, I can even use Markdown syntax in footnotes.