mattwelson / gatsby-starter-blog-tdd

A gatsby starter with tdd setup
https://gatsby-starter-blog-tdd.netlify.com
MIT License
1 stars 0 forks source link

Gatsby

Gatsby's blog starter now with 100% more MDX and TDD

Kick off your project with this blog boilerplate. This starter ships with the main Gatsby configuration files you might need to get up and running blazing fast with the blazing fast app generator for React, with support for an MDX blog.

Have another more specific idea? You may want to check out this awesome collection of official and community-created starters.

What's MDX you ask? MDX let's you use JSX in your Markdown, making it even easier to write blog posts, document your React components, and much more. Find out more about MDX, and gatsby-mdx, the plugin that makes this blog possible!

🚀 Quick start

  1. Create a Gatsby site.

    Use the Gatsby CLI to create a new site, specifying the blog starter.

    # create a new Gatsby site using the blog starter
    npx gatsby new my-blog-starter https://github.com/hagnerd/gatsby-starter-blog-mdx
  2. Start developing.

    Navigate into your new site’s directory and start it up.

    cd my-blog-starter/
    npm start
  3. Open the source code and start editing!

    Your site is now running at http://localhost:8000!

    Note: You'll also see a second link: http://localhost:8000/___graphql. This is a tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.

    Open the my-blog-starter directory in your code editor of choice and edit src/pages/index.js. Save your changes and the browser will update in real time!

  4. Open Cypress and Jest

With the site running you can now use Cypress and Jest

For unit tests create a __test__/*.js file next to the components you want to test, or use the *.spec.js or *.test.js pattern.

npm test

For end to end tests using Cypress create a test file at cypress/e2e/*.js.

npm run cy:open

💫 Deploy

Deploy to Netlify