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): fix language for code highlighting and highlight line #19163

Merged
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
6 changes: 3 additions & 3 deletions docs/docs/debugging-the-build-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports.onCreateNode = args => {

There is a bug in this code and using it will produce the error below:

```
```js
TypeError: Cannot read property 'internal' of undefined

- gatsby-node.js:6 Object.exports.onCreateNode.args [as onCreateNode]
Expand All @@ -42,11 +42,11 @@ One of the fastest ways to gain insight into Gatsby's build process is using the

Adding a `console.log` statement in the sample from above will print the variable into your terminal. There you might notice that `args` contains a lower-cased node variable.

```diff:title=gatsby-node.js
```js:title=gatsby-node.js
const { createFilePath } = require("gatsby-source-filesystem")

exports.onCreateNode = args => {
+ console.log(args)
console.log(args) // highlight-line
const { actions, Node } = args
if (Node.internal.type === "MarkdownRemark") {
const { createNodeField } = actions
Expand Down