Skip to content

Commit 5a94f06

Browse files
amberleyromom-allanson
authored andcommitted
(#6584): Restructure plugin overview and plugin authoring pages (#7229)
1 parent d24c9cb commit 5a94f06

File tree

2 files changed

+33
-26
lines changed

2 files changed

+33
-26
lines changed

docs/docs/plugin-authoring.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
title: Plugin Authoring
2+
title: Plugin authoring
33
---
44

5-
One of the best ways to add functionality to Gatsby is through our plugin system. Gatsby is designed to be extensible, which means plugins are able to extend and modify just about everything Gatsby does.
5+
You may be looking to build a plugin that doesn't exist yet, or you may just be curious to know more about the anatomy of a Gatsby plugin. We'll review:
66

7-
Of the many possibilities, plugins can:
8-
9-
- add external data or content (e.g. your CMS, static files, a REST API) to your Gatsby GraphQL data
10-
- transform data from other formats (e.g. YAML, CSV) to JSON objects
11-
- add third-party services (e.g. Google Analytics, Instagram) to your site
12-
- anything you can dream up!
7+
1. the core concepts of what a Gatsby plugin is
8+
2. naming conventions for the plugin title
9+
3. expected files in a plugin package
10+
4. defining a local (unpublished) plugin for your own use case
11+
5. what a plugin is _not_
1312

1413
## Core Concepts
1514

docs/docs/plugins.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,50 @@
22
title: Plugins
33
---
44

5-
Plugins are Node.js packages that implement Gatsby APIs. They enable you to
6-
easily solve common website build problems e.g. setup Sass, add markdown
7-
support, process images, etc.
5+
One of the best ways to add functionality to Gatsby is through our plugin system. Gatsby is designed to be extensible, which means plugins are able to extend and modify just about everything Gatsby does.
86

9-
For larger / complex sites, they let you modularize your site customizations
10-
into site-specific plugins.
7+
Of the many possibilities, plugins can:
118

12-
Gatsby has a large and growing set of plugins. To search/browse official and
13-
community plugins and their documentation, visit the [Plugin Library](/plugins/).
9+
- add external data or content (e.g. your CMS, static files, a REST API) to your Gatsby GraphQL data
10+
- transform data from other formats (e.g. Markdown, YAML, CSV) to JSON objects
11+
- add third-party services (e.g. Google Analytics, Instagram) to your site
12+
- anything you can dream up!
1413

15-
For documentation on the different types of plugins and the functionality provided by each, see the [Plugin Authoring page](/docs/plugin-authoring/).
14+
Gatsby plugins are Node.js packages that implement Gatsby APIs. For larger, more complex sites, plugins let you modularize your site customizations into site-specific plugins.
1615

17-
For a walkthrough of how to build and publish your own plugin, see the [Source Plugin Tutorial](/docs/source-plugin-tutorial/).
16+
## Search published plugins
1817

19-
## How to use Gatsby plugins?
18+
Gatsby has a large and growing ecosystem of official and community plugins. To browse plugins and their documentation, visit the [Gatsby Plugin Library](/plugins/).
2019

21-
Gatsby plugins are Node.js packages, so you can install them like other packages in
22-
node using NPM.
20+
## Learn more about plugins
2321

24-
For example, `gatsby-transformer-json` is a package which adds support for JSON
25-
files to the Gatsby data layer.
22+
For documentation with further detail on what comprises a Gatsby plugin (file structure, etc), see the [plugin authoring page](/docs/plugin-authoring/).
23+
24+
## Build and publish a plugin
25+
26+
For a walkthrough of how to build and publish your own plugin, see the [source plugin tutorial](/docs/source-plugin-tutorial/).
27+
28+
## Use a plugin in your site
29+
30+
Gatsby plugins are Node.js packages, so you can install them like other packages in node using NPM.
31+
32+
For example, `gatsby-transformer-json` is a package which adds support for JSON files to the Gatsby data layer.
2633

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

29-
`npm install --save gatsby-transformer-json`
36+
```bash
37+
npm install --save gatsby-transformer-json
38+
```
3039

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

3442
```javascript
3543
module.exports = {
3644
plugins: [`gatsby-transformer-json`],
3745
}
3846
```
3947

40-
Plugins can take options. Examples:
48+
Plugins can take options. For example:
4149

4250
```javascript
4351
module.exports = {

0 commit comments

Comments
 (0)