Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 1.79 KB

README.md

File metadata and controls

40 lines (24 loc) · 1.79 KB

Gatsby Theme Carbon Starter

What is this?

Gatsby has implemented a new feature called themes. Themes encapsulate all of the configuration and implementation details of Gatsby websites. This is a starter-kit (boilerplate) that has a dependancy on the gatsby-theme-carbon package. It includes some sample content in the src/pages directory.

What’s included?

  • Carbon Elements and Carbon React
  • Emotion for React component styling
  • gatsby-mdx with brand new markdown components

How do I use it?

gatsby-theme-carbon at it’s core relies on mdx for page creation. Check out the src/pages directory for some examples for using mdx.

A key feature of Gatsby themes is component shadowing. By simply placing a component into the src/gatsby-theme-carbon/components location, you can override components used by the theme. You can read more about component shadowing here.

You’re also free to make your own components and use them in your MDX pages.

Developing the docs

This is your primary method for starting up your Gatsby site for development.

  1. cd docs
  2. npm install
  3. npm run dev

Building the docs to test locally

This is what you’ll use to bundle your site for production. Gatsby will minimize your images and create a static, blazing fast site in your public directory. It is preferred to use the :prefix option, as this will append all of your links with a pathPrefix specified in your gatsby-config.js file.

  1. cd docs
  2. npm run build:prefix
  3. npm run serve:prefix

What’s Next?

  • Migrating reusable MDX components
  • Parameters to configure Carbon theme