Get unlimited public & private packages + package-based permissions with npm Pro.Get started »

gatsby-theme-wheelroom

5.0.1 • Public • Published

gatsby-theme-wheelroom

A generic gatsby-node.js built on consistent models and fragments, which takes care of pulling data from Contentful.

Have a look at the boilerplate to so see how to use this.

Wheelroom

The theme requires graphql queries to be defined. These can be generated by the wheelroom package and the plugin wheelroom-plugin-graphql.

Wheelroom is a tool for managing content models. It was designed to populate a headless CMS like contentful, generate graphql and generate boilerplate code.

Query types

The theme can handle three query types:

  • page: pages have a path which is used to create the actual pages
  • subPage: subPages have a slug from which the path is created
  • global: global data is added to every page

Install

Install the plugin by adding it to your gatsby-config.js

// Wheelroom generated files with graphql
const articleQuery = require('./src/graphql/article-query')
const globalsQuery = require('./src/graphql/globals-query')
const pageQuery = require('./src/graphql/page-query')
 
module.exports = {
  plugins: [
    {
      options: {
        defaultLocale: 'en-US',
        pageTemplate: path.resolve('./src/page-template.tsx'),
        queries: [articleQuery, globalsQuery, pageQuery],
      },
      resolve: `gatsby-theme-wheelroom`,
    },
...

Install

npm i gatsby-theme-wheelroom

DownloadsWeekly Downloads

800

Version

5.0.1

License

MIT

Unpacked Size

43.2 kB

Total Files

52

Last publish

Collaborators

  • avatar