Replaces user-defined footnote strings with numbered references.
npm install gatsby-remark-numbered-footnotesThis is a plugin for gatsby-transformer-remark that converts footnote reference links to sequential numbers.
It’s a lightweight wrapper around remark-numbered-footnotes to make it work with Gatsby.
``bash`
yarn add gatsby-remark-numbered-footnotes
In gatsby-config.js, add:
`diff`
module.exports = {
plugins: [
{
resolve: 'gatsby-transformer-remark',
options: {
+ plugins: [
+ 'gatsby-remark-numbered-footnotes',
+ ],
},
},
],
};
In Remark, it’s possible to add footnotes in Markdown like this:
`md
This is normal body copy.[^also] It includes a couple footnotes.[^thing]
[^also]:
This is a footnote.
[^thing]:
This is another footnote.
`
By default, this will generate the following HTML:
`html`
This is normal body copy.
also
It includes a couple footnotes.
thing
With gatsby-remark-numbered-footnotes, the markup will change to:
`diff``
This is normal body copy.
-
+
- also
+ 1
It includes a couple footnotes.
-
+
- thing
+ 2