What is remark-footnotes?
The remark-footnotes package is a plugin for the remark Markdown processor that allows users to add footnotes to their Markdown documents. It provides a syntax to include footnotes in the text, which are then rendered as references within the document, typically at the bottom of the page.
What are remark-footnotes's main functionalities?
Footnote Definition
This feature allows users to define footnotes in their Markdown content. The code sample shows how to use the remark-footnotes plugin with the remark library to process a Markdown string that includes a footnote definition.
const remark = require('remark');
const footnotes = require('remark-footnotes');
remark()
.use(footnotes, { inlineNotes: true })
.process('Some text[^1].\n\n[^1]: This is a footnote.', function (err, file) {
console.log(String(file));
});
Inline Footnotes
This feature enables the use of inline footnotes, which are footnotes defined directly within the text. The code sample demonstrates how to enable inline footnotes using the remark-footnotes plugin.
const remark = require('remark');
const footnotes = require('remark-footnotes');
remark()
.use(footnotes, { inlineNotes: true })
.process('Some text^[This is an inline footnote].', function (err, file) {
console.log(String(file));
});
Other packages similar to remark-footnotes
markdown-it-footnote
markdown-it-footnote is a plugin for the markdown-it Markdown parser. It allows users to add footnotes to their Markdown documents in a similar way to remark-footnotes. The main difference is that markdown-it-footnote is designed to work with the markdown-it parser, while remark-footnotes is designed for the remark ecosystem.
Deprecated: this package is no longer maintained.
Please use remark-gfm
instead.
That package match how footnotes work on github.com,
which is more likely to match the expectations of authors.
Git is still intact and previous versions can still be used without warnings.