npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gatsby-remark-reference-footnotes

v0.0.4

Published

gatsby remark plugin to generate footnotes

Downloads

12

Readme

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.

reference-link-prefix

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

reference-link-suffix

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

reference-link-position

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

inline-link-prefix

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

inline-link-suffix

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