From 8d3b022d1eee19a3b41455bc3c23f0964d39e983 Mon Sep 17 00:00:00 2001 From: Conrad Jackson Date: Mon, 1 Oct 2018 22:48:37 +0100 Subject: [PATCH 1/2] How to include a plugin in the Plugin Library --- docs/docs/source-plugin-tutorial.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/docs/source-plugin-tutorial.md b/docs/docs/source-plugin-tutorial.md index 80d0e7286cdd8..702c8842b55f2 100644 --- a/docs/docs/source-plugin-tutorial.md +++ b/docs/docs/source-plugin-tutorial.md @@ -355,7 +355,14 @@ Experiment with different options in your `gatsby-config.js` file to see how tha You've built a local plugin for your project, but what if you want to share it with others? `npm` allows you to publish your plugins. Check out the npm docs on [How to Publish & Update a Package](https://docs.npmjs.com/getting-started/publishing-npm-packages) for more info. -> **NOTE:** Don't forget to edit your plugin's `package.json` file to include info about your plugin. +> **NOTE:** Don't forget to edit your plugin's `package.json` file to include info about your plugin. To make sure it is included in the [Gatsby Plugin Library](https://www.gatsbyjs.org/plugins/), add a `keywords` field to package.json containing `gatsby` and `gatsby-plugin`. + +``` +"keywords": [ + "gatsby", + "gatsby-plugin" +] +``` ## Summary From cd82c73499523969567eb1ef6c2f1b7638fa9a29 Mon Sep 17 00:00:00 2001 From: Conrad Jackson Date: Tue, 2 Oct 2018 17:47:53 +0100 Subject: [PATCH 2/2] Updated after review --- docs/docs/source-plugin-tutorial.md | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/docs/docs/source-plugin-tutorial.md b/docs/docs/source-plugin-tutorial.md index 702c8842b55f2..446de737cf0b9 100644 --- a/docs/docs/source-plugin-tutorial.md +++ b/docs/docs/source-plugin-tutorial.md @@ -353,16 +353,9 @@ Experiment with different options in your `gatsby-config.js` file to see how tha ## Publishing a plugin -You've built a local plugin for your project, but what if you want to share it with others? `npm` allows you to publish your plugins. Check out the npm docs on [How to Publish & Update a Package](https://docs.npmjs.com/getting-started/publishing-npm-packages) for more info. +Don't publish this particular plugin to npm or the Gatsby Plugin Library, because it's just a sample plugin for the tutorial. However, if you've built a local plugin for your project, and want to share it with others, `npm` allows you to publish your plugins. Check out the npm docs on [How to Publish & Update a Package](https://docs.npmjs.com/getting-started/publishing-npm-packages) for more info. -> **NOTE:** Don't forget to edit your plugin's `package.json` file to include info about your plugin. To make sure it is included in the [Gatsby Plugin Library](https://www.gatsbyjs.org/plugins/), add a `keywords` field to package.json containing `gatsby` and `gatsby-plugin`. - -``` -"keywords": [ - "gatsby", - "gatsby-plugin" -] -``` +> **NOTE:** Once you have published your plugin on `npm`, don't forget to edit your plugin's `package.json` file to include info about your plugin. If you'd like to publish a plugin to the [Gatsby Plugin Library](https://www.gatsbyjs.org/plugins/) (please do, it's really easy!), please follow the [Plugin Authoring guide](https://www.gatsbyjs.org/docs/plugin-authoring/#publishing-a-plugin-to-the-library). ## Summary