<commit_before>---
title: Plugins
---

Plugins are Node.js packages that implement Gatsby APIs. They enable you to
easily solve common website build problems e.g. setup Sass, add markdown
support, process images, etc.

For larger / complex sites, they let you modularize your site customizations
into site-specific plugins.

Gatsby has a large and growing set of plugins. To search/browse official and 
community plugins and their documentation, visit the [Plugin Library](/packages/).

## How to use Gatsby plugins?

Gatsby plugins are just Node.js packages meaning you install them like anything else in
node using NPM.

For example, `gatsby-transformer-json` is a package which adds support for JSON
files to the Gatsby data layer.

To install it, in the root of your site you run:

`npm install --save gatsby-transformer-json`

Then in your site's `gatsby-config.js` you add `gatsby-transformer-json`
to the plugins array like:

```javascript
module.exports = {
  plugins: [`gatsby-transformer-json`],
};
```

Plugins can take options. Note that plugin options will be stringified by Gatsby, so they cannot be functions.

## Creating your own plugins

If you’d like to create a custom Gatsby plugin, check out the [plugin authoring guide](/docs/plugin-authoring/).<commit_msg>Update plugins with plugin authoring link (#4646)<commit_after>---
title: Plugins
---

Plugins are Node.js packages that implement Gatsby APIs. They enable you to
easily solve common website build problems e.g. setup Sass, add markdown
support, process images, etc.

For larger / complex sites, they let you modularize your site customizations
into site-specific plugins.

Gatsby has a large and growing set of plugins. To search/browse official and 
community plugins and their documentation, visit the [Plugin Library](/packages/).

For information on building your own plugin, see the Plugin Authoring page (/plugin-authoring.md).

## How to use Gatsby plugins?

Gatsby plugins are just Node.js packages meaning you install them like anything else in
node using NPM.

For example, `gatsby-transformer-json` is a package which adds support for JSON
files to the Gatsby data layer.

To install it, in the root of your site you run:

`npm install --save gatsby-transformer-json`

Then in your site's `gatsby-config.js` you add `gatsby-transformer-json`
to the plugins array like:

```javascript
module.exports = {
  plugins: [`gatsby-transformer-json`],
};
```

Plugins can take options. Note that plugin options will be stringified by Gatsby, so they cannot be functions.
{'fraction_non_alphanumeric': 0.07405956112852664, 'fraction_numerical': 0.001567398119122257, 'mean_word_length': 4.36344537815126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4782619', 'n_tokens_mistral': 736, 'n_tokens_neox': 710, 'n_words': 349}