@@ -22,7 +22,7 @@ You'll need to use `gatsby-source-filesystem` and tell it to source
2222"posts" from a folder called ` content/posts ` located in the project's
2323root.
2424
25- > ** NOTE ** : ` gatsby-plugin-mdx ` uses ` .mdx ` by default as a file extension to
25+ > ** Note ** : ` gatsby-plugin-mdx ` uses ` .mdx ` by default as a file extension to
2626> recognize which files to use. You can also [ use ` .md ` as a file
2727> extension] ( /packages/gatsby-plugin-mdx#extensions ) if you want.
2828
@@ -49,7 +49,7 @@ You can read about
4949[ ` gatsby-source-filesystem ` ] ( /packages/gatsby-source-filesystem )
5050if you'd like to learn more.
5151
52- ## Add MDX Files
52+ ## Add MDX files
5353
5454Before you can write any GraphQL queries and programmatically create
5555pages, you need to add some content.
@@ -64,28 +64,28 @@ mkdir -p content/posts
6464touch content/posts/blog-{1,2}.mdx
6565```
6666
67- > ** NOTE ** :
67+ > ** Note ** :
6868> ` mkdir -p path/to/a/directory ` will create every folder in the path if
6969> it does not exist.
7070>
71- > _ ` touch <filename> ` will create an empty file named ` <filename> ` . The
71+ > ` touch <filename> ` will create an empty file named ` <filename> ` . The
7272> brackets (` {} ` ) are [ an
7373> expansion] ( https://twitter.com/kentcdodds/status/1083399683932868609?s=19 )
74- > which means you can create multiple files in one command._
74+ > which means you can create multiple files in one command.
7575
7676Open up each of the files you just created and add some content.
7777
7878``` md:title=blog-1.mdx
7979---
80- title: " Blog Post 1"
80+ title: Blog Post 1
8181---
8282
8383Trying out MDX
8484```
8585
8686``` md:title=blog-2.mdx
8787---
88- title: " Blog Post 2"
88+ title: Blog Post 2
8989---
9090
9191Gatsby is the best
@@ -138,15 +138,15 @@ paths to usable URLs.
138138
139139[ ` onCreateNode ` ] ( https://www.gatsbyjs.org/docs/node-apis/#onCreateNode )
140140is a Gatsby lifecycle method that gets called whenever a new node is
141- created. In this case only ` Mdx ` nodes are touched.
141+ created. In this case only ` MDX ` nodes are touched.
142142
143143## Create pages from sourced MDX files
144144
145145In order to create pages from the sourced MDX files, you need
146146to construct a query that finds all MDX nodes and pulls out
147147the ` slug ` field added earlier.
148148
149- > ** NOTE ** : You can open up a GraphiQL console for query testing
149+ > ** Note ** : You can open up a GraphiQL console for query testing
150150> in your browser at < http://localhost:8000/___graphql >
151151
152152``` graphql
219219
220220## Make a template for your posts
221221
222- Make a file called ` posts-page-layout.js ` in ` src/components ` . This component
222+ You can create a file called ` posts-page-layout.js ` in ` src/components ` - this component
223223will be rendered as the template for all posts. There's a component,
224224` MDXRenderer ` which is used by ` gatsby-plugin-mdx ` that will be used to render any
225225programmatically accessed MDX content.
@@ -294,10 +294,10 @@ That's it, you're done. Run `gatsby develop` and enjoy your new MDX
294294powers.
295295
296296Now you have all the pieces you need to programmatically create pages
297- with Gatsby and ` gatsby-plugin-mdx ` . Check out our other guides to find out
297+ with Gatsby and ` gatsby-plugin-mdx ` . You can check out our other guides to find out
298298more about all of the cool stuff you can do with ` gatsby-plugin-mdx ` .
299299
300- ## Bonus: Make a Blog Index
300+ ## Bonus: Make a blog index
301301
302302``` javascript:title=src/pages/index.js
303303import React from " react"
0 commit comments