0.1.2 • Published 2 years ago

kontent-migration-cli v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Kontent Migration CLI

This package is a migration runner for Kentico Kontent CMS. It allows the following instructions:

  • Tracking migrations in the project
  • Creating new content types
  • Migrating content types and content changes across types
  • Rolling back any changinges

Gettings started

yarn

Migration spaces

For each Kentico space you should create a different migrations folder. You can set which migrations folder you will be using with the MIGRATION_FOLDER environment variable.

Commands

CommandAction
yarn migrate initInitiate the migrations in Kontent
yarn migrate makeMake new Kontent migrations
yarn migrate runRun new migrations
yarn migrate rollbackRoll back existing migrations

Environment Variables

To run this project you will need a number of environment variables

VariableDescription
API_KEYKontent management API key
PROJECT_IDKontent project ID
ENVIRONMENTKontent environment
MIGRATION_FOLDERThe name of the migrations folder
PREVIEW_KEYKontent preview API key

Implementation

This project uses Kontent Migrate all the commands used are abstractions from this library.

Use Cases

Making a new migration

Convention for migration description

  • Should start with a capital letter
  • Should start with an imperative mood verb

Examples:

  • "Create Micro Copy content-type"
  • "Add title field to Page content-type"
  • "Remove description from all content-types"