{"id":15383796,"url":"https://github.com/jamessimone/gatsby-remark-footnotes","last_synced_at":"2025-04-15T19:38:27.315Z","repository":{"id":55497763,"uuid":"184831767","full_name":"jamessimone/gatsby-remark-footnotes","owner":"jamessimone","description":"Customize your Gatsby Remark markup footnotes","archived":false,"fork":false,"pushed_at":"2021-05-24T02:52:47.000Z","size":10,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-24T02:57:10.241Z","etag":null,"topics":["gatsby","gatsby-plugin","gatsby-remark","gatsby-remark-plugin","gatsbyjs","markdown"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jamessimone.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-03T23:28:52.000Z","updated_at":"2024-07-17T14:24:35.000Z","dependencies_parsed_at":"2022-08-15T01:50:25.827Z","dependency_job_id":null,"html_url":"https://github.com/jamessimone/gatsby-remark-footnotes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamessimone%2Fgatsby-remark-footnotes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamessimone%2Fgatsby-remark-footnotes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamessimone%2Fgatsby-remark-footnotes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamessimone%2Fgatsby-remark-footnotes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamessimone","download_url":"https://codeload.github.com/jamessimone/gatsby-remark-footnotes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249052062,"owners_count":21204950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gatsby","gatsby-plugin","gatsby-remark","gatsby-remark-plugin","gatsbyjs","markdown"],"created_at":"2024-10-01T14:39:41.556Z","updated_at":"2025-04-15T19:38:27.262Z","avatar_url":"https://github.com/jamessimone.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gatsby Remark Footnotes Plugin\n\n## gatsby-remark-footnotes\n\n[![npm](https://img.shields.io/npm/v/gatsby-remark-footnotes/latest.svg?style=flat-square)](https://www.npmjs.com/package/gatsby-remark-footnotes)\n\nThis is a Gatsby Remark plugin that aims to customize the text and style of footnotes in case you want to adhere to the Wikipedia style, `^`, front of the footnote-type link.\n\n## Installation\n\nWith npm:\n\n`npm install --save gatsby-remark-footnotes`\n\nor with yarn, if that's more your style:\n\n`yarn add gatsby-remark-footnotes`\n\n## Example config\n\n```javascript\n// In gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-transformer-remark`,\n    options: {\n      plugins: [\n        {\n          resolve: `gatsby-remark-footnotes`,\n          options: {\n            footnoteBackRefPreviousElementDisplay: \"inline\",\n            footnoteBackRefDisplay: \"inline\",\n            footnoteBackRefInnerText: \"^\", // Defaults to: \"↩\"\n            //use if you want the Wikipedia style ^ link without an underline beneath it\n            footnoteBackRefAnchorStyle: `text-decoration: none;`,\n            //use \"front\" for Wikipedia style ^ links\n            footnoteBackRefInnerTextStartPosition: \"front\",\n            useFootnoteMarkerText: false, // Defaults to false\n            useCustomDivider: \"\u003chr/\u003e\u003cstrong\u003eReferences:\u003c/strong\u003e\" // Defaults to \u003chr/\u003e\n          }\n        }\n      ]\n    }\n  }\n];\n```\n\n## Plugin Options: in-depth\n\n`footnoteBackRefPreviousElementDisplay`: the \"previous\" element is _always_ a `\u003cp\u003e` tag. Change the CSS display property of it with this prop. Can be omitted if you prefer to not change the display property from the `block` default, or you have a stylesheet overriding the default already.\n\n`footnoteBackRefDisplay`: the footnote \"back ref\" refers to the `\u003ca\u003e` tag that can be clicked on to bring a user back to the footnote they originated from. Set both this and `footnoteBackRefPreviousElementDisplay` to `inline` to have them appear side-by-side. Can be omitted, same as above.\n\n`footnoteBackRefInnerText`: defaults to `↩`. You can use whatever you'd like. Go nuts, replace it with a 👋!\n\n`footnoteBackRefAnchorStyle`: As in the example above, if you use `^` you'll want to override the `text-decoration` property (and potentially other ones, like color, if that's your thing) to conform to the Wikipedia style. Can be omitted.\n\n`footnoteBackRefInnerTextStartPosition`: `front` for Wikipedia style, otherwise can be omitted.\n\n`useFootnoteMarkerText`: set to `true` to use footnote's \"marker\" (how the footnote is introduced between the Markdown brackets) as the footnote \"heading\" introducing the footnote in the actual footnote section. Markdown by default auto-numbers footnotes, regardless of how they are introduced; if you use a series of footnotes like so [^1] [^second] [^third] the footnotes will auto number to _1, 2, 3_ in the footnote sections. By setting this flag to `true`, the second and third footnotes would be introduced: `second.` and `third.`\n\n`useCustomDivider`: defaults to `\u003chr/\u003e`, can be replaced with HTML of the user's choosing. If set to `\"\"` it will remove the horizontal rule.\n\n## Targeting your footnotes with further CSS selectors\n\nThis plugin appends `class` names to the elements it produces so that you can further stylize / override the existing CSS.\n\n- `\u003cp\u003e` tag: `footnote-paragraph` class\n- `\u003cli\u003e` tag: `footnote-list-item` class\n- `\u003ca\u003e` tag: `footnote-backref` class\n- (if using `useFootnoteMarkerText` config option) `\u003cspan\u003e` tag: `footnote-marker-text` class\n\n## Considerations\n\nThis plugin removes nodes from the AST Markdown tree that `gatsby-transformer-remark` uses to otherwise massage your markdown.\nThis means that _other_ functionality you might rely on from other Gatsby plugins also working on your markdown will probably not work as expected for your footnotes. E.G. you use `gatsby-external-link` - it's not going to pick up on anchor tags present in your footnotes. This plugin automatically adds `target=\"_blank\" rel=\"noopener noreferrer` properties to your anchor tags.\n\nContributions are welcome!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamessimone%2Fgatsby-remark-footnotes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamessimone%2Fgatsby-remark-footnotes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamessimone%2Fgatsby-remark-footnotes/lists"}