0.1.1 • Published 4 years ago

@talves/gatsby-theme-plugin-data v0.1.1

Weekly downloads
1
License
-
Repository
-
Last release
4 years ago

@talves/gatsby-theme-plugin-data

The theme data plugin to combine data theme collection types. This plugin will combine our config collections for netlify-cms and write out a config (src/cms/config.json) for use by the cms.

Pass in the config for our headers for netlify-cms if we are going to use it.

module.exports = {
  backend: {
    name: 'github',
    repo: 'talves/gatsby-site-demo-cms',
    branch: 'master',
  },
  load_config_file: false,
  display_url: 'https://example.com',
  media_folder: 'static/media',
  public_folder: '/media',
};

Here is a gatsby-config.js example of two data plugins

const config = require('./cms-config');

module.exports = {
  plugins: [
    {
      resolve: `@talves/gatsby-theme-plugin-data`,
      options: {
        config,
        plugins: [
          {
            resolve: '@talves/gatsby-theme-plugin-data-settings',
            options: {
              config: {},
            },
          },
          {
            resolve: '@talves/gatsby-theme-plugin-data-blog',
            options: {
              config: {},
            },
          },
        ],
      },
    },
  ],
};

OR to simplify

const config = require('./cms-config');

module.exports = {
  plugins: [
    {
      resolve: `@talves/gatsby-theme-plugin-data`,
      options: {
        config,
        plugins: [
          `@talves/gatsby-theme-plugin-data-settings`,
          `@talves/gatsby-theme-plugin-data-blog`,
        ],
      },
    },
  ],
};

© ADARTA Inc. 2019 (No License)

This open source software has No License and owner reserves all rights. Owner reserves the right to change the license at any time or grant or deny a private license when requested. Unauthorized use, modification, or sharing of the software is unlawful for any purpose without prior written permission.