From 2ae017f2d83f5eeea33341aa147281cecfc8850d Mon Sep 17 00:00:00 2001 From: T Thiyagaraj Date: Mon, 6 Apr 2020 12:24:38 +0530 Subject: [PATCH 1/2] Fix formatting, add commas --- docs/docs/creating-a-generic-plugin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/creating-a-generic-plugin.md b/docs/docs/creating-a-generic-plugin.md index 9ddcca4d41227..207dabf135c44 100644 --- a/docs/docs/creating-a-generic-plugin.md +++ b/docs/docs/creating-a-generic-plugin.md @@ -43,9 +43,9 @@ exports.sourceNodes = ({ actions, createNodeId, createContentDigest })=>{ } const newNode = { ...nodeData, - id: createNodeId("TestNode-testid") + id: createNodeId("TestNode-testid"), internal :{ - type: "TestNode" + type: "TestNode", contentDigest: createContentDigest(nodeData), }, } From 0eb87a7ccf609880645a56db2db60cb43f9c4bae Mon Sep 17 00:00:00 2001 From: gatsbybot Date: Mon, 6 Apr 2020 09:26:46 +0000 Subject: [PATCH 2/2] chore: format --- docs/docs/creating-a-generic-plugin.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/docs/creating-a-generic-plugin.md b/docs/docs/creating-a-generic-plugin.md index 207dabf135c44..716e25f45acbe 100644 --- a/docs/docs/creating-a-generic-plugin.md +++ b/docs/docs/creating-a-generic-plugin.md @@ -36,15 +36,15 @@ In `gatsby-node.js` you can carry out functions with these APIs, such as: [sourceNodes](/docs/node-apis/#sourceNodes) is a life-cycle API that a plugin can use to create Nodes. An example of how to implement a function using `sourceNodes` is shown below: ```javascript:title=gatsby-node.js -exports.sourceNodes = ({ actions, createNodeId, createContentDigest })=>{ +exports.sourceNodes = ({ actions, createNodeId, createContentDigest }) => { const nodeData = { - title : "Test Node", - description:"Testing the node " + title: "Test Node", + description: "Testing the node ", } const newNode = { ...nodeData, id: createNodeId("TestNode-testid"), - internal :{ + internal: { type: "TestNode", contentDigest: createContentDigest(nodeData), },