Pure Markdown + HTML Footnotes

There’s a lot of boilerplate here, but I figure I should share how I’ve been writing footnotes for this blog, in the the hopes that it’ll someday help someone, somewhere in this vast and infinite universe:

<a class="anchor" id="1-text"></a>Some concise content.[<sup>1</sup>](#1)

[...]

<a class="anchor" id="1"></a><sup>1</sup> Let's expand on it at the end of the post. [⏎](#1-text)

That should work in any blogging system that supports Markdown, but Jekyll also exposes the URL slug of the current post to help avoid conflicts on collection pages that may contain footnotes from multiple posts. This can be used like so:

<a class="anchor" id="markdown-footnotes-1-text"></a>Some concise content.[<sup>1</sup>](#markdown-footnotes-1)

[...]

<a class="anchor" id="markdown-footnotes-1"></a><sup>1</sup> Let's expand on it at the end of the post. [⏎](#markdown-footnotes-1-text)

Tags: ,

Updated: