This is based on Robin Wieruch's https://github.com/rwieruch/gatsby-mdx-blog-starter-project
A starter project in Gatsby.js with MDX.
- MDX: JavaScript/React in Markdown
- Prism.js: Syntax Highlighting
- Pagination
- Categories
- Emotion
git clone git@github.com:eggheadio/gatsby-starter-egghead-blog.git
cd gatsby-starter-egghead-blog
npm install
gatsby develop
- visit http://localhost:8000
gatsby new gatsby-starter-egghead-blog git@github.com:eggheadio/gatsby-starter-egghead-blog.git
cd gatsby-starter-egghead-blog
npm install
gatsby develop
- visit http://localhost:8000
- Inside of
content/blog/
, create a directoryYYYY-MM-DD-slug-here/
with a fileindex.mdx
. - Posts will be displayed newest to oldest.
- At the top of
index.mdx
, add the following frontmatter:
---
slug: "demo-post-1"
date: "2017-01-01"
title: "Demo Post 1"
keywords: ['demo', 'post', 'one']
description: "This is the first demo post"
published: true // false will hide it from the site
---
# This is where the Markdown starts
- Once you add a first blog post, there's a commented out section in
components/Footer.js
with a list of Articles that you'll want reveal to the users.