From 6643bdd5aae1e6ae651467e875567b5c2038ff15 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 21 Oct 2022 16:35:26 -0700 Subject: [PATCH 1/6] fix(docs): Update the create a source plugin tutorial --- .../creating-a-source-plugin.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md index 5124eee72ac82..2bdd13e4981d4 100644 --- a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md +++ b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md @@ -5,25 +5,26 @@ tableOfContentsDepth: 2 import { Announcement } from "gatsby-interface" +Source plugins are reusable integrations with content and data backends. There are already [100s of ready-to-use source plugins for popular content APIs](https://www.gatsbyjs.com/plugins/?=gatsby-source) like Contentful, Drupal, and WordPres. This tutorial teaches you how to build your own integration. + In this tutorial, you'll create your own source plugin that will gather data from an API. The plugin will source data, optimize remote images, and create foreign key relationships between data sourced by your plugin. ## What is a source plugin? -Source plugins "source" data from remote or local locations into what Gatsby calls [nodes](/docs/reference/graphql-data-layer/node-interface/). This tutorial uses a demo API so that you can see how the data works on both the frontend and backend, but the same principles apply if you would like to source data from another API. +Source plugins fetch data from remote or local services and write the data into the embedded Gatsby DB. At a high-level, a source plugin: -- Ensures local data is synced with its source and is 100% accurate. -- Creates [nodes](/docs/reference/graphql-data-layer/node-interface/) with accurate media types, human-readable types, and accurate - [contentDigests](/docs/reference/graphql-data-layer/node-interface/#contentdigest). -- Links nodes & creates relationships between them. -- Lets Gatsby know when nodes are finished sourcing so it can move on to processing them. +- Ensures the data in the Gatsby DB is synced with the latest updates from its source +- Creates [nodes](/docs/reference/graphql-data-layer/node-interface/) (Gatsby's name for an object) with accurate media types, human-readable types, and accurate + [contentDigests](/docs/reference/graphql-data-layer/node-interface/#contentdigest) +- Create relationships between nodes A source plugin is a regular npm package. It has a `package.json` file, with optional dependencies, as well as a [`gatsby-node.js`](/docs/reference/config-files/gatsby-node/) file where you implement Gatsby's Node APIs. Read more about [files Gatsby looks for in a plugin](/docs/files-gatsby-looks-for-in-a-plugin/) or [creating a generic plugin](/docs/how-to/plugins-and-themes/creating-a-generic-plugin). ## Why create a source plugin? -Source plugins convert data from any source into a format that Gatsby can process. Your Gatsby site can use several source plugins to combine data in interesting ways. +Source plugins makes data from any source available to your Gatsby sites. Your Gatsby site can use several source plugins to combine data in interesting ways. There may not be [an existing plugin](/plugins/?=gatsby-source) for your data source, so you can create your own. From b9dac26b3dbe01d6b227467fa6ef84daa7c0ab06 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 21 Oct 2022 16:50:16 -0700 Subject: [PATCH 2/6] Update docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md Co-authored-by: Dustin Schau --- docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md index 2bdd13e4981d4..03b877355cc7d 100644 --- a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md +++ b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md @@ -18,7 +18,7 @@ At a high-level, a source plugin: - Ensures the data in the Gatsby DB is synced with the latest updates from its source - Creates [nodes](/docs/reference/graphql-data-layer/node-interface/) (Gatsby's name for an object) with accurate media types, human-readable types, and accurate [contentDigests](/docs/reference/graphql-data-layer/node-interface/#contentdigest) -- Create relationships between nodes +- Creates relationships between nodes A source plugin is a regular npm package. It has a `package.json` file, with optional dependencies, as well as a [`gatsby-node.js`](/docs/reference/config-files/gatsby-node/) file where you implement Gatsby's Node APIs. Read more about [files Gatsby looks for in a plugin](/docs/files-gatsby-looks-for-in-a-plugin/) or [creating a generic plugin](/docs/how-to/plugins-and-themes/creating-a-generic-plugin). From 6776d2d5e2d7b3a3cda5bbff2ba244eaa215d2fb Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Fri, 21 Oct 2022 16:50:40 -0700 Subject: [PATCH 3/6] Update docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md Co-authored-by: Dustin Schau --- docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md index 03b877355cc7d..2fd88201c839b 100644 --- a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md +++ b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md @@ -24,7 +24,7 @@ A source plugin is a regular npm package. It has a `package.json` file, with opt ## Why create a source plugin? -Source plugins makes data from any source available to your Gatsby sites. Your Gatsby site can use several source plugins to combine data in interesting ways. +Source plugins make data from any source available to your Gatsby sites. Your Gatsby site can use several source plugins, like commerce data from Shopify, or content from one or more content management systems (like Contentful, WordPress, etc.), all in a unified graph. There may not be [an existing plugin](/plugins/?=gatsby-source) for your data source, so you can create your own. From c07f67ced73b69113860b0f7469f2908c98c0c9c Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Sat, 22 Oct 2022 15:04:05 -0700 Subject: [PATCH 4/6] Update creating-a-source-plugin.md --- docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md index 2fd88201c839b..26c803b2fc0d6 100644 --- a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md +++ b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md @@ -5,7 +5,7 @@ tableOfContentsDepth: 2 import { Announcement } from "gatsby-interface" -Source plugins are reusable integrations with content and data backends. There are already [100s of ready-to-use source plugins for popular content APIs](https://www.gatsbyjs.com/plugins/?=gatsby-source) like Contentful, Drupal, and WordPres. This tutorial teaches you how to build your own integration. +Source plugins are reusable integrations with content and data backends. There are already [100s of ready-to-use source plugins for popular content APIs](https://www.gatsbyjs.com/plugins/?=gatsby-source) like Contentful, Drupal, and WordPress. This tutorial teaches you how to build your own integration. In this tutorial, you'll create your own source plugin that will gather data from an API. The plugin will source data, optimize remote images, and create foreign key relationships between data sourced by your plugin. From acc1ef5a5672236e8cdb5e319b4e821d9040f2fa Mon Sep 17 00:00:00 2001 From: Lennart Date: Mon, 24 Oct 2022 08:33:18 +0200 Subject: [PATCH 5/6] relative link --- docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md index 26c803b2fc0d6..59d51a4a332f0 100644 --- a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md +++ b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md @@ -5,7 +5,7 @@ tableOfContentsDepth: 2 import { Announcement } from "gatsby-interface" -Source plugins are reusable integrations with content and data backends. There are already [100s of ready-to-use source plugins for popular content APIs](https://www.gatsbyjs.com/plugins/?=gatsby-source) like Contentful, Drupal, and WordPress. This tutorial teaches you how to build your own integration. +Source plugins are reusable integrations with content and data backends. There are already [100s of ready-to-use source plugins for popular content APIs](/plugins/?=gatsby-source) like Contentful, Drupal, and WordPress. This tutorial teaches you how to build your own integration. In this tutorial, you'll create your own source plugin that will gather data from an API. The plugin will source data, optimize remote images, and create foreign key relationships between data sourced by your plugin. From 52b31b5bad3e3ff4fb03b04b355f0dbd771908ca Mon Sep 17 00:00:00 2001 From: Lennart Date: Mon, 24 Oct 2022 08:34:36 +0200 Subject: [PATCH 6/6] explain acronym --- docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md index 59d51a4a332f0..4cd8b22d004cc 100644 --- a/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md +++ b/docs/docs/how-to/plugins-and-themes/creating-a-source-plugin.md @@ -11,7 +11,7 @@ In this tutorial, you'll create your own source plugin that will gather data fro ## What is a source plugin? -Source plugins fetch data from remote or local services and write the data into the embedded Gatsby DB. +Source plugins fetch data from remote or local services and write the data into the embedded Gatsby Database (powered by [LMDB](https://github.com/kriszyp/lmdb-js)). At a high-level, a source plugin: