Enabling footnotes in Hugo
Posted on June 21st, 2023
I've been unable to find concrete instructions for this, but my ecosia-fu might be off today. In either case, this is how you set up footnotes for Hugo:
Hugo footnotes aren't actually part of Hugo, but are a feature from, at least, goldmark. Enabling it is surprisingly trivial1:
markup:
goldmark:
extensions:
footnote: true
renderer:
# Not entirely clear on whether this is required or not, but feel free to play around with it
unsafe: true
footnoteAnchorPrefix: ""
footnoteReturnLinkContents: "^"
And for a bit of recursion, the source code for this file:
Hugo footnotes aren't actually part of Hugo, but are a feature from, at least, goldmark. Enabling it is surprisingly trivial[^1]:
```yaml
markup:
goldmark:
extensions:
footnote: true
renderer:
# Not entirely clear on whether this is required or not, but feel free to play around with it
unsafe: true
footnoteAnchorPrefix: ""
footnoteReturnLinkContents: "^"
```
...
[^1]: Minimal config required
Minimal config required ↩︎
Comments
Note that all comments are required to follow the code of conduct