Yeah, Gatsby is great! As a developer using react, I've tried to use gatsby to generate my blog from markdown. Maybe it's good for you, have a try?

Not meeting your need? You may want to check out vibrant collection of official and community-created starters.

🚀 Quick start

  1. Create a Gatsby site.

    Use the Gatsby CLI to create a new site, specifying a gatsby template.

    This need a node environment and npm tool. Move to for detail.

    # create a new Gatsby site using the gatsby-blog-ghlandy
    gatsby new my-gatsby-blog
  2. Install dependencies.

    cd my-gatsby-blog
    npm i
  3. Fill your site info.

    Use your favorite editor, vim for example, to edit config.js,

    vim config.js

    as below,

    module.exports = {
      title: 'your site title',
      description: 'your site description',
      author: 'you nickname',
  4. Write your personal post.

    All posts are markdown file under the markdown directory. To write a post, you can simply dumplicate or modify the default file as wish. What you need to keep in mind is the markdown frontmatters. Each post markdown need three frontmatters as below,

    title: 'Usage Detail'
    date: '2019-04-27T04:11:22.348Z'
    path: '/usage-detail'

    Post page will display the title.

    The standard date need to be formatted as a ISOString, like new Date().toISOString() in js. And it works in the format of 2019-04-27 or 2019-04-27 04:11:22.

    The path, at last, will be displayed in the location bar of browser,, for example.

  5. preview and build you blog.

    To preview, run npm start and your sit will run at http://localhost:8000

    To Build, run npm bun build. All static files are store under the public directory. Just deplay it to your server, or build with netlify, etc.

🧐 What's inside?

A quick look at the top-level files and directories you'll see in a Gatsby project.

├── markdown
├── node_modules
├── src
├── .gitignore
├── .prettierrc
├── config.js
├── gatsby-browser.js
├── gatsby-config.js
├── gatsby-node.js
├── gatsby-ssr.js
├── package.json
  1. /markdown: Posts markdown file.
  2. /node_modules: Dependencies.
  3. /src: This directory will contain all of the code related to what you will see on the front-end of your site (what you see in the browser) such as your site header or a page template. src is a convention for “source code”.
  4. .gitignore: This file tells git which files it should not track / not maintain a version history for.
  5. .prettierrc: This is a configuration file for Prettier. Prettier is a tool to help keep the formatting of your code consistent.
  6. .prettierrc: A simple config file of site info.
  7. gatsby-browser.js: This file is where Gatsby expects to find any usage of the Gatsby browser APIs (if any). These allow customization/extension of default Gatsby settings affecting the browser.
  8. gatsby-config.js: This is the main configuration file for a Gatsby site. This is where you can specify information about your site (metadata) like the site title and description, which Gatsby plugins you’d like to include, etc. (Check out the config docs for more detail).
  9. gatsby-node.js: This file is where Gatsby expects to find any usage of the Gatsby Node APIs (if any). These allow customization/extension of default Gatsby settings affecting pieces of the site build process.
  10. gatsby-ssr.js: This file is where Gatsby expects to find any usage of the Gatsby server-side rendering APIs (if any). These allow customization of default Gatsby settings affecting server-side rendering.
  11. LICENSE: This blog template is licensed under the MIT license, powered by Gatsby.
  12. package-lock.json (See package.json below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won’t change this file directly).
  13. package.json: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project.
  14. A text file containing useful reference information about your project.

🎓 Learning Gatsby

Looking for more guidance? Full documentation for Gatsby lives on the website. Here are some places to start:

  • For most developers, we recommend starting with our in-depth tutorial for creating a site with Gatsby. It starts with zero assumptions about your level of ability and walks through every step of the process.
  • To dive straight into code samples, head to our documentation. In particular, check out the Guides, API Reference, and Advanced Tutorials sections in the sidebar.