Footnotes plugin for markdown-it markdown parser.
markdown-it v5.+, see changelog.
Markup is based on pandoc definition.
Here is a footnote reference,[^1] and another.[^longnote] [^1]: Here is the footnote. [^longnote]: Here's one with multiple blocks. Subsequent paragraphs are indented to show that they belong to the previous footnote.
Here is a footnote reference, and another.This paragraph won’t be part of the note, because itisn’t indented.Here is the footnote. ↩Here’s one with multiple blocks.Subsequent paragraphs are indented to show that theybelong to the previous footnote. ↩
Here is an inline note.^[Inlines notes are easier to write, since you don't have to pick an identifier and move down to type the note.]
Here is an inline note.Inlines notes are easier to write, sinceyou don’t have to pick an identifier and move down to type thenote. ↩
npm install markdown-it-footnote --savebower install markdown-it-footnote --save
var md =;md // See examples above
Differences in browser. If you load script directly into the page, without
package system, module will add itself globally as
If you want to customize the output, you'll need to replace the template
functions. To see which templates exist and their default implementations,
index.js. The API of these template functions is out of
scope for this plugin's documentation; you can read more about it in the
To demonstrate with an example, here is how you might replace the
this plugin emits by default with an
<h4> emitted by your own template
const md = ;mdrendererrules'<h4 class="mt-3">Footnotes</h4>\n' +'<section class="footnotes">\n' +'<ol class="footnotes-list">\n';