Skip to content

Guide · Open source

How to use Decap CMS: install, configure and edit content

Updated · written with AI from the project's own documentation and checked against our catalogue data

Decap CMS is an open-source, MIT-licensed admin interface that you add to a static website at the /admin path so people can edit content stored in a Git repository. This guide explains how it works, the two ways to install it, and how to describe your content with a YAML config. By the end you will know what you need before starting and what the setup involves.

Decap CMSdecaporg/decap-cms · ★ 19.5k · MIT

Quick start

  1. 1Confirm your site fits. Make sure your site is built with a static site generator and keeps its content in a Git repository.
  2. 2Pick an install method. Use the quick install for a single HTML file and config file, or the npm install if your build system supports npm packages.
  3. 3Add the admin page. Serve Decap CMS as a single-page app at the /admin path of your site.
  4. 4Write the YAML config. Describe your site's content model in a YAML config file.
  5. 5Adjust the layout. Tweak the main CMS layout so it fits your own site.
  6. 6Log in at /admin. Visit /admin/ on your site, log in, and create or edit content.

What Decap CMS does and how it works

Decap CMS is a single-page app that you pull into the /admin part of your site. It presents a clean interface for editing content that is stored in a Git repository, rather than in a database.

When a user navigates to /admin/ they are prompted to log in. Once authenticated, they can create new content or edit existing content.

Check the prerequisites before you start

Decap CMS is meant for a static site built with a static site generator, with its content kept in a Git repository. The README expects you to edit a YAML config file and possibly work with a build system.

  • A static site built with a static site generator
  • A Git repository holding your content
  • Node.js and npm, needed only for the advanced npm-based install

Choose between the quick install and the npm install

The README describes two ways to use Decap CMS. The quick and easy install requires a single HTML file and a configuration file, with all CMS JavaScript and CSS loaded from a CDN. The complete, more advanced install gives you more flexibility but requires a static site builder with a build system that supports npm packages.

The project's Quick Start Guide, linked from the README, covers the single-HTML-file route in detail.

  • Quick install: one HTML file plus one config file, assets from a CDN
  • Advanced install: npm packages within a build system

Clone the repository

The README's install command clones the source code from GitHub. Use it if you want to read or work with the source directly.

git clone https://github.com/decaporg/decap-cms

Describe your content in a YAML config

You set up a YAML config to describe the content model of your site. The README notes that you will typically also tweak the main layout of the CMS to fit your own site.

The full field and collection syntax is documented on the official site at decapcms.org, which the README links to as its documentation.

  • Define the content model in YAML
  • Adjust the CMS layout to match your site

Log in and edit content

Once the CMS is served at /admin, editors log in and can create or change content. Because content lives in Git, the README describes it as a Git-based editing workflow.

What people use it for

  • Letting non-developers edit pages and posts on a static site
  • Editing content for a site built with a static site generator without a database
  • Running a self-hosted, MIT-licensed editor instead of a hosted CMS
  • Managing a content model defined in a YAML file within a Git repository

Frequently asked questions

Is Decap CMS free?

Decap CMS is released under the MIT License, as stated in the README. The README also says you should make sure you understand the license's implications and guarantees.

What are the requirements for Decap CMS?

You need a static site built with a static site generator and content kept in a Git repository. Node.js and npm are needed only for the advanced npm-based install.

What is the difference between Decap CMS and Netlify CMS?

Decap CMS is the new name of Netlify CMS, renamed in February 2023 according to the README. It keeps the same purpose of editing Git-stored content for static sites.

Does Decap CMS need a database?

No. Decap CMS stores content in a Git repository rather than a database, so it is not suited to sites that need a traditional database-backed CMS.

Can I use Decap CMS without any setup?

Not with the open-source project alone. The README's quick start still requires configuration. A hosted backend called Decap Turbo is mentioned separately, and the README describes it as managing logins, caching large collections and access per site.

What are alternatives to Decap CMS?

The source lists Netlify CMS, Forestry, TinaCMS and Keystatic as comparable projects. Compare them on how they store content and how much setup they need.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Decap CMS suits teams who want non-developers to edit content on a static site that lives in Git, and developers who want a self-hosted MIT-licensed editor. It is a poor fit for database-backed sites, or for anyone who wants a fully hosted service with no configuration.

Install options & downloads