Back to Gatsby

Gatsby Theme Blog Core Starter Recipe

deprecated-packages/gatsby-recipes/recipes/gatsby-theme-blog-core.mdx

2.20.01.4 KB
Original Source

Gatsby Theme Blog Core Starter Recipe

Gatsby theme blog core is a great theme for adding blog functionality to your site. It's designed to handle sourcing your blog data for you so you can style it however you like.

This recipe:


Installs necessary NPM packages.

<NPMPackage name="gatsby-theme-blog-core" />

Installs the gatsby-theme-blog-core plugin in gatsby-config.js and makes use of the basePath configuration so the blog listing appears at /blog.

<GatsbyPlugin name="gatsby-theme-blog-core" options={{ basePath: /blog }} />


Adds some posts.

<File path="content/posts/hello-world.md" content="https://gist.githubusercontent.com/laurieontech/c4729983c08e759cd10bf6a708ee2c0f/raw/ed8e1e5f6542928ac74f5ac3855db246e6980754/hello-world-post.md" /> <File path="content/posts/second-post.md" content="https://gist.githubusercontent.com/laurieontech/6957cd524dbbf0503682fad759001893/raw/eba38eb3048c190388f5348944d5114930fe4591/second-post.md" />


After installing this recipe, you will be setup to style your blog however you like.

When you've finished installing the recipe, run gatsby develop and check out http://localhost:8000/blog for the list of posts.

Example content is available at http://localhost:8000/blog/hello-world and http://localhost:8000/blog/second-post.