Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlengstorf/gatsby-remark-numbered-footnotes
A small plugin to change named footnotes to numbered footnotes in your Gatsby pages using Markdown.
https://github.com/jlengstorf/gatsby-remark-numbered-footnotes
gatsby gatsby-plugin gatsbyjs remark
Last synced: 3 months ago
JSON representation
A small plugin to change named footnotes to numbered footnotes in your Gatsby pages using Markdown.
- Host: GitHub
- URL: https://github.com/jlengstorf/gatsby-remark-numbered-footnotes
- Owner: jlengstorf
- Created: 2018-02-26T16:43:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-09T16:22:12.000Z (over 3 years ago)
- Last Synced: 2024-10-09T12:42:52.601Z (4 months ago)
- Topics: gatsby, gatsby-plugin, gatsbyjs, remark
- Language: JavaScript
- Size: 82 KB
- Stars: 16
- Watchers: 3
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gatsby-remark-numbered-footnotes
This is a plugin for [`gatsby-transformer-remark`](https://github.com/gatsbyjs/gatsby/tree/master/packages/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.
## Installation
```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',
+ ],
},
},
],
};
```## Example Output
In [Remark](https://remark.js.org/), 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
```