@talves/gatsby-plugin-data-core
v0.1.2
Published
Data core handling for our themes.
Downloads
10
Maintainers
Readme
@talves/gatsby-plugin-data-core
Data core handling for our themes.
Using the plugin
Here are the steps to setup your data for your theme:
- Create a default config in your theme to return a
{ collections: []}
object
Typically place that insrc/cms/default-config.js
with an exports of the collections object - Add the plugin to the
gatsby-config.js
plugins Pass the config to the plugin
Also pass the base pathbasePath
for the theme
const config = require('./src/cms/default-config.js');
module.exports = {
plugins: [
// Setup the netlify cms source (data)
{
resolve: `@talves/gatsby-plugin-data-core`,
options: {
config,
basePath: `${__dirname}`,
},
},
],
};
That's it! Your config will be processed by gatsby-source-netlify-cms
to add the correct schema for the config file with types and also resolvers for relative fields.
See @talves/gatsby-theme-plugin-data
to process all your theme plugin data into one config for your site and gatsby-plugin-netlify-cms
© 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.