How to create blog posts from markdown with gatsby in 2021

John Grisham
The Startup
Published in
11 min readFeb 2, 2021

--

Photo by Freddy G on Unsplash

Markdown and Blog Posts

The modern man’s equivalent to the ’60s nuclear family is a website; and today, building one is easier than ever. With plenty of platforms to choose from, it’s not difficult to find which one suits your needs — but once you’ve found it, there’s still work to do.

Regardless of where your site is hosted or what platform it’s built on, the one thing they all have in common is blog posts. That’s something to think about before moving from another host and changing platforms as well.

Fortunately, Gatsby has your back with their perfect static website builder for blogs using Markdown formatting for those blog posts which means an easy transition from another host and site builder!

I’m going to show you how to take markdown files in Gatsby and turn them into generated HTML blog posts, so let’s get started.

Setting up the project

For this tutorial, I’m going to be using the free Peanut Butter & Jelly Gatsby template I created. The complete version is also available if you like the template and want to support me by purchasing it.

You can check out the template demo here:

--

--