Skip to content

Latest commit

 

History

History
94 lines (67 loc) · 4.81 KB

File metadata and controls

94 lines (67 loc) · 4.81 KB

Build a Blog with React and Markdown using Gatsby

All Contributors

These notes are intended to be used and studied in tandem with Taylor Bell's Build a Blog with React and Markdown using Gatsby course.

Instructor

Taylor Bell

Course Goal

In this course, you’ll build a Gatsby site that transforms Markdown documents from your local filesystem into HTML. From there, you’ll use GraphQL to query posts for displaying on an index page, link between posts, and group posts by tags. After your site has been compiled, you’ll see how to deploy it via Github Pages.

⚠️ Deprecations

The v2 branch is no longer present on the gatsbyjs/gatsby-starter-hello-world instead use:

gatsby new my-blog https://github.com/gatsbyjs/gatsby-starter-hello-world

You can have multiple instances of this plugin to read source nodes from different locations on your filesystem.

This is the new way to query file nodes. It's important to add query MyQuery.

query MyQuery {
  allFile {
    edges {
      node {
        extension
        dir
        modifiedTime
      }
    }
  }
}

StaticQuery does not work with raw React.createElement calls; please use JSX, e.g. <StaticQuery />

It's also possible to deploy the entire Gatsby website to Netlify. Click on the Deploy site button and Netlify will start the build and deploy process you have specified. You can go to the Deploys tab and see the process unfold in the Deploy log. After a few moments, it will give you the live site URL, e.g., random-name.netlify.com.

Remember to add your deploy settings with the below options (if needed):

Branch to deploy: the default is main. Build Command: the default is npm run build. Publish directory: the default is public.

Table of Contents

Contributors


Lauro Silva

🖋