Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): Update formatting #22845

Merged
merged 2 commits into from
Apr 6, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/docs/creating-a-generic-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ 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 :{
type: "TestNode"
id: createNodeId("TestNode-testid"),
internal: {
type: "TestNode",
contentDigest: createContentDigest(nodeData),
},
}
Expand Down