Scripts2026年5月14日·1 分钟阅读

Decap CMS — Git-Based Headless Content Management System

Decap CMS (formerly Netlify CMS) is an open-source headless CMS that stores content directly in your Git repository. It provides a rich editing UI on top of static site generators like Hugo, Gatsby, and Next.js, letting editors work through a web dashboard while developers keep full version-control workflows.

Agent 就绪

这个资产可以被 Agent 直接读取和安装

TokRepo 同时提供通用 CLI 命令、安装契约、metadata JSON、按适配器生成的安装计划和原始内容链接,方便 Agent 判断适配度、风险和下一步动作。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Decap CMS Overview
通用 CLI 安装命令
npx tokrepo install 2f81a8ef-4f6e-11f1-9bc6-00163e2b0d79

Introduction

Decap CMS is an open-source content management system that pairs a clean editing UI with Git-based storage. Originally built as Netlify CMS, it was rebranded to Decap CMS and is now maintained by the community. It enables non-technical editors to create and update content for static sites without touching code, while every change is committed to the repository as a standard Git commit.

What Decap CMS Does

  • Provides a web-based editorial dashboard for managing Markdown, YAML, JSON, and TOML content files
  • Commits every content change directly to your Git repository (GitHub, GitLab, Bitbucket)
  • Supports custom content types via a declarative YAML configuration file
  • Offers live preview, rich text editing, media uploads, and editorial workflows with draft/review/publish states
  • Integrates with any static site generator including Hugo, Gatsby, Jekyll, Eleventy, and Next.js

Architecture Overview

Decap CMS is a single-page React application that runs entirely in the browser. It communicates with Git hosting APIs through configurable backends (GitHub, GitLab, Bitbucket, or a custom proxy). When an editor saves content, the CMS creates a commit via the provider's API. An optional local backend (decap-server) proxies Git operations during development. The configuration lives in a single config.yml that defines collections, fields, and media storage.

Self-Hosting & Configuration

  • Add admin/index.html with a script tag pointing to the Decap CMS bundle and a config.yml alongside it
  • Configure the backend (e.g., backend: { name: github, repo: owner/repo, branch: main })
  • Define collections with fields such as string, text, markdown, image, datetime, select, and relation
  • Set up an OAuth provider or use the Git Gateway proxy for authentication
  • Optionally run npx decap-server for local development without Git API calls

Key Features

  • Zero database required; content lives in Git, making backups and rollbacks trivial
  • Editorial workflow with draft, in-review, and ready states backed by pull requests
  • Extensible widget system for custom field types and previews
  • Works with any static site generator or front-end framework
  • Open-source and community-maintained with no vendor lock-in

Comparison with Similar Tools

  • Strapi — full-stack headless CMS with its own database; heavier to host but offers REST/GraphQL APIs out of the box
  • Sanity — real-time collaborative CMS with a hosted backend; more powerful editing but requires a paid plan at scale
  • TinaCMS — also Git-backed but uses a GraphQL data layer and visual editing; tighter integration but more complex setup
  • Contentful — SaaS headless CMS with CDN delivery; no self-hosting option and usage-based pricing
  • Keystatic — newer Git-based CMS with TypeScript-first config; smaller ecosystem but growing

FAQ

Q: Does Decap CMS require a server? A: No. The CMS runs as a client-side React app in the browser and talks directly to your Git provider's API. You only need a server if you use the optional Git Gateway or local proxy for development.

Q: Can I use Decap CMS with frameworks other than static site generators? A: Yes. Any project that stores content as flat files in a Git repository can use Decap CMS. Next.js, Nuxt, and Astro projects commonly integrate it.

Q: How does authentication work? A: Decap CMS supports OAuth via GitHub, GitLab, or Bitbucket. You can also use Netlify Identity or a custom OAuth proxy. For local development, the decap-server backend bypasses authentication entirely.

Q: What happened to Netlify CMS? A: Netlify CMS was renamed to Decap CMS in early 2023 and transferred to community maintenance. The core functionality remains the same, and migration from Netlify CMS requires only updating package names.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产