1.0.0 • Published 5 years ago

gatsby-plugin-netlifycms-auto-branch v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

Automatically modify backend branch for NetlifyCMS

This plugin automatically update config.yml so that backend.branch is the same with your current git branch.

This plugin will also

  • only runs in development
  • only modify config.yml the first time you run gatsby develop in a new branch

Install

yarn add gatsby-plugin-netlifycms-auto-branch
# sorry about the long name

Usage

// gatsby-config.js

module.exports = {
  plugins: [
    // use default setting
    `gatsby-plugin-netlifycms-auto-branch`,

    // or pass in a custom path to your config
    {
      resolve: `gatsby-plugin-netlifycms-auto-branch`,
      options: {
        pathToConfig: 'static/admin/config.yml',
      },
    },
  ]
}