# @theowenyoung/gatsby-transformer-references

> Transform markdown nodes to add the necesserary references for bi-directional links

Latest version **1.10.5** (published 2022-04-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @theowenyoung/gatsby-transformer-references
pnpm add @theowenyoung/gatsby-transformer-references
yarn add @theowenyoung/gatsby-transformer-references
bun add @theowenyoung/gatsby-transformer-references
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.10.5 |
| Published | 2022-04-21 |
| First published | 2021-08-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 11.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 689 |
| Author | Mathieu Dutour |
| Maintainers | theowenyoung |
| Keywords | gatsby, transformer, markdown, references, bi-directional links |

## Links

- npm: https://www.npmjs.com/package/@theowenyoung/gatsby-transformer-references
- Repository: https://github.com/mathieudutour/gatsby-digital-garden
- Homepage: https://github.com/mathieudutour/gatsby-digital-garden#readme
- Issues: https://github.com/mathieudutour/gatsby-digital-garden/issues
- npm.io page: https://npm.io/package/@theowenyoung/gatsby-transformer-references

## Dependencies (8)

- [remark](https://npm.io/package/remark.md) ^13.0.0
- [anymatch](https://npm.io/package/anymatch.md) ^3.1.2
- [is-relative-url](https://npm.io/package/is-relative-url.md) ^3.0.0
- [remark-wiki-link](https://npm.io/package/remark-wiki-link.md) ^1.0.4
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^2.0.3
- [remark-inline-links](https://npm.io/package/remark-inline-links.md) ^5.0.0
- [@theowenyoung/remark-rewrite](https://npm.io/package/@theowenyoung/remark-rewrite.md) ^1.0.2
- [@theowenyoung/transformer-markdown-url](https://npm.io/package/@theowenyoung/transformer-markdown-url.md) ^1.9.7

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.10.5 (latest) — 2022-04-21
- 1.10.4 — 2022-02-17
- 1.10.3 — 2022-02-14
- 1.10.2 — 2022-01-21
- 1.10.1 — 2021-09-03
- 1.10.0 — 2021-08-31
- 1.9.4 — 2021-08-22
- 1.9.3 — 2021-08-21
- 1.9.2 — 2021-08-21
- 0.1.1 — 2021-08-21
- 0.1.0 — 2021-08-21

## README

# @theowenyoung/gatsby-transformer-references

Transformer plugin to extract references between markdown nodes. You can then use them to create bi-directional links.

An example site for using this plugin is at [https://wiki.owenyoung.com/](https://wiki.owenyoung.com/)

## Install

```shell
npm install --save @theowenyoung/gatsby-transformer-references
```

## How to use

```javascript
// In your gatsby-config.js
module.exports = {
  plugins: [
    // after a markdown or Mdx transformer
    {
      resolve: `@theowenyoung/gatsby-transformer-references`,
      options: {
        types: ["Mdx"], // or ["MarkdownRemark"] (or both)
      },
    },
  ],
};
```

### Configuration options

**`types`** [Array<string>][optional]

The types of the nodes to transform. Defaults to `['Mdx']`

## How to query for references

Two types of references are available: `outboundReferences` and `inboundReferences`.

The fields will be created in your site's GraphQL schema on the nodes of types specified in the options.

```graphql
{
  allMdx {
    outboundReferences {
      ... on Mdx {
        id
      }
    }
    inboundReferences {
      ... on Mdx {
        id
      }
    }
  }
}
```

---
_Source: https://npm.io/package/@theowenyoung/gatsby-transformer-references · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
