The Gatsby blog core theme
A Gatsby theme for creating a blog child theme. It includes all of the data structures you need to get up and running building a blog and includes no additional theming or style opinions.
Installation
Use the blog core theme starter
This will generate a new site that pre-configures use of the blog core theme.
gatsby new my-themed-blog https://github.com/gatsbyjs/gatsby-starter-blog-theme-core
Manually add to your site
npm install --save gatsby-theme-blog-core
Usage
Theme options
Key | Default value | Description |
---|
basePath | / | Root url for all blog posts |
contentPath | content/posts | Location of blog posts |
assetPath | content/assets | Location of assets |
mdx | true | Configure gatsby-plugin-mdx (if your website already is using the plugin pass false to turn this off) |
Example usage
module.exports = {
plugins: [
{
resolve: `gatsby-theme-blog-core`,
options: {
basePath: `/blog`,
},
},
],
}
Additional configuration
In addition to the theme options, there are a handful of items you can customize via the siteMetadata
object in your site's gatsby-config.js
module.exports = {
siteMetadata: {
title: `My Blog Title`,
author: `My Name`,
description: `My site description...`,
social: [
{
name: `Twitter`,
url: `https://twitter.com/gatsbyjs`,
},
{
name: `GitHub`,
url: `https://github.com/gatsbyjs`,
},
],
},
}