A Gatsby theme using Netlify CMS and MDX. The theme uses netlify-cms-backend-fs for local development.
npm install --save gatsby-theme-netlify_cms
Add theme to the plugins
field in your gatsby-config.js
.
module.exports = {
//...
plugins: [
{ resolve: '@mrozilla/gatsby-theme-netlify_cms' },
//...
],
//...
};
You can extend the Netlify CMS configuration options by shadowing the config.js
file. See the default config set by the theme to understand the existing structure.
// src/gatsby-theme-netlify_cms/config.js
import config from '@mrozilla/gatsby-theme-netlify_cms/src/config';
// e.g. add a new block type
config.collections = [
...config.collections.map((collection) => {
if (collection.name === 'pages') {
return {
...collection,
fields: collection.fields.map((field) => {
if (field.name === 'blocks') {
return {
...field,
types: [
...field.types,
{ name: 'New', fields: [{name: 'title'}] }
],
};
}
return field;
}),
};
}
return collection;
}),
];
export default config;
This project adheres to Semantic Versioning. Every release is documented on the Github Releases page.