@@ -230,7 +230,7 @@ module.exports = {
230230 },
231231 },
232232 ],
233- }
233+ };
234234```
235235
236236Restart the development server.
@@ -405,7 +405,7 @@ module.exports = {
405405 },
406406 },
407407 ],
408- }
408+ };
409409` ` `
410410
411411Save that and restart the gatsby development server. Then open up Graph_i_QL
@@ -607,7 +607,7 @@ module.exports = {
607607 },
608608 },
609609 ],
610- }
610+ };
611611` ` `
612612
613613Restart the development server then refresh (or open again) Graph_i_QL and look
@@ -769,7 +769,7 @@ exports.onCreateNode = ({ node }) => {
769769 if (node .internal .type === ` MarkdownRemark` ) {
770770 console .log (node .internal .type )
771771 }
772- }
772+ };
773773` ` `
774774
775775We want to use each Markdown file name to create the page slug. So
@@ -784,7 +784,7 @@ exports.onCreateNode = ({ node, getNode }) => {
784784 const fileNode = getNode(node.parent)
785785 console.log(`\n `, fileNode.relativePath)
786786 }
787- }
787+ };
788788```
789789
790790There in your terminal you should see the relative paths for our two Markdown
@@ -797,13 +797,13 @@ tricky, the `gatsby-source-filesystem` plugin ships with a function for creating
797797slugs. Let's use that.
798798
799799```javascript{1,5}
800- const { createFilePath } = require(`gatsby-source-filesystem`)
800+ const { createFilePath } = require(`gatsby-source-filesystem`);
801801
802802exports.onCreateNode = ({ node, getNode }) => {
803803 if (node.internal.type === `MarkdownRemark`) {
804804 console.log(createFilePath({ node, getNode, basePath: `pages` }))
805805 }
806- }
806+ };
807807```
808808
809809The function handles finding the parent `File` node along with creating the
@@ -822,7 +822,7 @@ the original creator of a node can directly modify the node—all other plugins
822822fields.
823823
824824```javascript{3,4,6-11}
825- const { createFilePath } = require(`gatsby-source-filesystem`)
825+ const { createFilePath } = require(`gatsby-source-filesystem`);
826826
827827exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
828828 const { createNodeField } = boundActionCreators
@@ -834,7 +834,7 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
834834 value: slug,
835835 })
836836 }
837- }
837+ };
838838```
839839
840840Restart the development server and open or refresh Graph_i_QL. Then run this
@@ -860,7 +860,7 @@ In the same `gatsby-node.js` file, add the following. Here we tell Gatsby about
860860our pages—what are their paths, what template component do they use, etc.
861861
862862```javascript{15-34}
863- const { createFilePath } = require(`gatsby-source-filesystem`)
863+ const { createFilePath } = require(`gatsby-source-filesystem`);
864864
865865exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
866866 const { createNodeField } = boundActionCreators
@@ -872,7 +872,7 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
872872 value: slug,
873873 })
874874 }
875- }
875+ };
876876
877877exports.createPages = ({ graphql, boundActionCreators }) => {
878878 return new Promise((resolve, reject) => {
@@ -893,7 +893,7 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
893893 resolve()
894894 })
895895 })
896- }
896+ };
897897```
898898
899899We've added an implementation of the
@@ -922,8 +922,8 @@ export default () => {
922922Then update `gatsby-node.js`
923923
924924```javascript{1,17,32-41}
925- const path = require(`path`)
926- const { createFilePath } = require(`gatsby-source-filesystem`)
925+ const path = require(`path`);
926+ const { createFilePath } = require(`gatsby-source-filesystem`);
927927
928928exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
929929 const { createNodeField } = boundActionCreators
@@ -935,7 +935,7 @@ exports.onCreateNode = ({ node, getNode, boundActionCreators }) => {
935935 value: slug,
936936 })
937937 }
938- }
938+ };
939939
940940exports.createPages = ({ graphql, boundActionCreators }) => {
941941 const { createPage } = boundActionCreators
@@ -966,7 +966,7 @@ exports.createPages = ({ graphql, boundActionCreators }) => {
966966 resolve()
967967 })
968968 })
969- }
969+ };
970970```
971971
972972Restart the development server and our pages will be created! An easy way to
@@ -1020,11 +1020,11 @@ Return to `src/pages/index.js` and let's query for our Markdown slugs and create
10201020links.
10211021
10221022```jsx{3,18-19,29,46-48}
1023- import React from " react"
1024- import g from " glamorous"
1025- import Link from " gatsby- link"
1023+ import React from " react" ;
1024+ import g from " glamorous" ;
1025+ import Link from " gatsby- link" ;
10261026
1027- import { rhythm } from " ../ utils/ typography"
1027+ import { rhythm } from " ../ utils/ typography" ;
10281028
10291029export default ({ data }) => {
10301030 return (
0 commit comments