Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including @rshackleton/gatsby-theme-kontent with all npm packages installed. Try it out:

require("gatsby/package.json"); // gatsby is a peer dependency. var gatsbyThemeKontent = require("@rshackleton/gatsby-theme-kontent")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

@rshackleton/gatsby-theme-kontent v1.0.1

Gatsby theme containing plugins to super-charge Kentico Kontent projects.

gatsby-theme-kontent

Quick Start

npm install @rshackleton/gatsby-theme-kontent
yarn add @rshackleton/gatsby-theme-kontent

Add the theme to your gatsby-config.js.

module.exports = {
  plugins: [
    {
      resolve: `@rshackleton/gatsby-theme-kontent`,
      options: {
        kontent: {
          // @kentico/gatsby-source-kontent options
        },
        kontentImage: {
          // @rshackleton/gatsby-transformer-kontent-image options
        },
      },
    },
  ],
};

What does it do?

The gatsby-theme-kontent theme includes two key plugins for developing a Gatsby website with Kentico Kontent.

Firstly, the official @kentico/gatsby-source-kontent plugin is included. The theme accepts the same options as the source plugin under the kontent configuration key.

Secondly, the @rshackleton/gatsby-transformer-kontent-image plugin is included. This adds support for Gatsby Image to the KontentAsset GraphQL type.

Contributing

To contribute to this package please fork the repository to make your changes.

This project makes use of changesets. When making changes please ensure a new changeset is created to define how the package versions should be updated.

Once you are ready open a new PR into this repository with a clear and detailed description of the changes made and which issue(s) are affected.

Development

To work on this repository you can use the yarn workspaces to test the plugin using the included Gatsby website. This can be done by running yarn start from the root or site directory.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free