1.0.2 • Published 4 years ago

@dseoane/gatsby-theme-blog-core v1.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

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

  1. Install the theme
npm install @dseoane/gatsby-theme-blog-core
  1. Add the configuration to your gatsby-config.js file
// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `@dseoane/gatsby-theme-blog-core`,
      options: {
        // basePath defaults to `/`
        basePath: `/blog`,
      },
    },
  ],
};
  1. Add blog posts to your site by creating md or mdx files inside /content/posts.

    Note that if you've changed the default contentPath in the configuration, you'll want to add your markdown files in the directory specified by that path.

  2. Run your site using gatsby develop and navigate to your blog posts. If you used the above configuration, your URL will be http://localhost:8000/blog

Usage

Theme options

KeyDefault valueDescription
basePath/Root url for all blog posts
contentPathcontent/postsLocation of blog posts
assetPathcontent/assetsLocation of assets
disablePostsPagefalseSet this flag true if you don't want to generate the posts page
mdxOtherwiseConfiguredfalseSet this flag true if gatsby-plugin-mdx is already configured for your site

Blog Post Fields

The following are the defined blog post fields based on the node interface in the schema

FieldType
idString
slugString
noindexBoolean
featuredBoolean
imageFile
titleString
descriptionString
dateDate
excerptString
bodyString
categoryString
tagsString