Socket
Socket
Sign inDemoInstall

gatsby-remark-reference-footnotes

Package Overview
Dependencies
24
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gatsby-remark-reference-footnotes

gatsby remark plugin to generate footnotes


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
1.02 MB
Created
Weekly downloads
 

Readme

Source

Footnotes in Gatsby

Downloads

Gatsby plugin using remark to generate footnotes with advanced grouping.

Installation

npm i gatsby-remark-reference-footnotes

Use

Generate footnotes:

[^Normal footnote]

<!-- This code block gets replaced with footnotes -->

```references

```

Generate footnotes for a specific group of footnotes:

[^:fig:Footnote for group named fig]

<!-- This code block gets replaced with footnotes for group `fig` -->

```references
group-include: fig
```

If you like to overwrite the global settings in place (camelCase or kebab-case):

<!-- This code block gets replaced with footnotes -->

```references
group-include: fig

inline-link-prefix: ' Fig. '
inline-link-suffix: '.'
inline-text-prefix: ' '
inline-text-suffix: ''

reference-link-position: end

reference-link-prefix:  ' Fig. '
reference-link-suffix:  '.⇡'
reference-text-prefix:  ' '
reference-text-suffix:  ''
```

Global Configuration

Global configurations can be set in gatsby-config.js.

module.exports = ({ root }) => ({
  plugins: [
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          {
            resolve: `gatsby-remark-reference-footnotes`,
            options: {
              groupInclude: "default",

              inlineLinkPrefix: "",
              inlineLinkSuffix: "",
              inlineTextPrefix: "",
              inlineTextSuffix: "",

              referenceLinkPosition: "start",

              referenceLinkPrefix: "↑ ",
              referenceLinkSuffix: ".",
              referenceTextPrefix: "",
              referenceTextSuffix: " "
            }
          }
        ]
      }
    }
  ]
});

Options

group-include

string? — default: default
If a footnote reference starts with :groupname: the output can be filtered by this group-name.

string? — default: Footnote: in link before reference number

string? — default: . Footnote: in link after reference number

reference-text-prefix

string? — default: '' Footnote: text before reference link

reference-text-suffix

string? — default: ' ' Footnote: text after reference link

string? — default: start – options: start|end Footnote-Reference: should the reference link be at the start or end

string? — default: '' Footnote-Reference: in link before inline number

string? — default: '' Footnote-Reference: in link after inline number

inline-text-prefix

string? — default: '' Footnote-Reference: text before inline link

inline-text-suffix

string? — default: '' Footnote-Reference: text after inline link

Example

Input

Text with[^test] reference footnote[^test].
Text with inline footnote[^here the inline reference].

![Cat](http://placekitten.com/g/80/120)
_This is a cat [^:fig:Reference from a different group]_

<!-- refs -->

[^test]: This is the named reference

### Footnotes

<!-- This code block gets replaced with footnotes -->

```references

```

### Figures

<!-- This code block gets replaced with footnotes -->

```references
group-include: fig
inline-link-prefix: 'Fig. '
reference-link-position: end
reference-link-prefix: ' Fig. '
reference-link-suffix: ' ⇡'
reference-text-prefix: ' '
```

Output

example output

License

MITStefan Huber

Version

  • 0.0.4 – FIX: sorting problems

Keywords

FAQs

Last updated on 09 Jan 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc