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-carbonpackage. It includes some sample content in thesrc/pagesdirectory.
- Carbon Elements and Carbon React
- Emotion for React component styling
- gatsby-mdx with brand new markdown components
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.
This is your primary method for starting up your Gatsby site for development.
cd docsnpm installnpm run dev
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.
cd docsnpm run build:prefixnpm run serve:prefix
- Migrating reusable MDX components
- Parameters to configure Carbon theme