selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

Decap CMS logo

Self-host Decap CMS

decap-cms@3.17.3

Git-based editor UI for static sites

ReleaseOpen SourceMIT
Updated9 hours ago
LanguageJavaScript
Setup difficultyEasy
Stars
19 453
Install with Linux
Editor screen with live preview of the entry being writtenEditorial workflow view showing draft, review and publish statesMedia library screen with an external media integrationEntry form using the relation field widgetStructured (object) widget customization in the editor

What is Decap CMS?

Decap CMS is the community continuation of Netlify CMS: an open-source, MIT-licensed content management system that wraps your Git workflow instead of running a database. It is a single-page React app you expose at the /admin path of a static site, where editors create and change content that is committed straight back to your repository through the GitHub, GitLab, Gitea, Bitbucket, Azure or Git Gateway backend. Everything is declared in one config.yml file: collections and fields built from ready-made widgets, media folders, publish_mode editorial workflow with draft/review/publish states, preview templates, search, slugs and i18n locales. You install it by dropping an index.html that loads the script from a CDN, or by adding the decap-cms npm package to your site build; npx decap-server covers local development against a test backend. It does not deliver content itself — your static site generator renders the files. The optional hosted Decap Turbo backend adds server-side auth, caching and role management for larger editorial teams.

Should you self-host Decap CMS?

Decap CMS scores 72/100 on selfhost.directory (how scoring works) and ranks #4 of 13 in Headless CMS. It has 19 453 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. It is MIT-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is Strapi (85/100, 73 393 stars). It scores higher overall, so compare the two before you pick. See Decap CMS vs Strapi side by side.

Features

  • Built-in media library
  • Content modeling with collections and widgetsNested collections are labelled beta in the docs.
  • Content searchMay exhaust Git API rate limits on large repositories; toggle with search: false.
  • Custom widgets and plugins
  • Deploy preview links
  • Editorial workflowEnabled with publish_mode: editorial_workflow; works with GitHub and supports GitLab and Bitbucket.
  • Git-based content storage
  • Internationalization (I18N)
  • Local development server
  • Multiple Git backends
  • Rich text / Markdown editing
  • Static site generator agnostic
  • Web-based editor with live preview
  • YAML Configuration

Decap CMS README

How to install Decap CMS

Install Decap CMS with Linux

Content Manager

Add an admin/index.html plus admin/config.yml to the static files of your site; unpkg can be used as an alternative CDN source.

How to configure Decap CMS

  • api_roothttps://api.github.com (GitHub), https://gitlab.com/api/v4 (GitLab), https://try.gitea.io/api/v1 (Gitea) or https://api.bitbucket.org/2.0 (Bitbucket)The API endpoint; only necessary in certain cases, like with GitHub Enterprise or self-hosted GitLab/Gitea.

    The API endpoint; only necessary in certain cases, like with GitHub Enterprise or self-hosted GitLab/Gitea.

  • auth_endpointauth (GitHub, Bitbucket) or oauth/authorize (GitLab)Path to append to base_url for authentication requests; optional.

    Path to append to base_url for authentication requests; optional.

  • backendRequired setting: the backend option specifies how to access the content for your site, including authentication (repo, branch, api_root and auth options nested under it).

    Required setting: the backend option specifies how to access the content for your site, including authentication (repo, branch, api_root and auth options nested under it).

    values: git-gateway, azure, bitbucket, gitea, github, gitlab, test, turbo-github, turbo-gitlab

  • backend: nameProperty under backend selecting which Decap CMS backend to use; set for example as "backend: name: turbo-github". Backends ship for GitHub, GitLab, Gitea, Bitbucket, Azure, Git Gateway, proxy and test.

    Property under backend selecting which Decap CMS backend to use; set for example as "backend: name: turbo-github". Backends ship for GitHub, GitLab, Gitea, Bitbucket, Azure, Git Gateway, proxy and test.

    values: git-gateway, azure, bitbucket, gitea, github, gitlab, test, turbo-github, turbo-gitlab

  • base_urlhttps://api.netlify.com (GitHub, Bitbucket), https://gitlab.com (GitLab) or https://try.gitea.io (Gitea)OAuth client hostname (just the base domain, no path); required when using an external OAuth server or self-hosted GitLab/Gitea.

    OAuth client hostname (just the base domain, no path); required when using an external OAuth server or self-hosted GitLab/Gitea.

  • branchmasterThe branch where published content is stored; all CMS commits and PRs are made to this branch.

    The branch where published content is stored; all CMS commits and PRs are made to this branch.

  • cms_label_prefixdecap-cms/Pull (or Merge) Request label prefix when using the editorial workflow; optional.

    Pull (or Merge) Request label prefix when using the editorial workflow; optional.

  • collectionsRequired setting and the heart of the configuration: defines the content model (folder and file collections, fields, widgets).

    Required setting and the heart of the configuration: defines the content model (folder and file collections, fields, widgets).

  • commit_messagesBackend option to customize the templates used to generate commit messages, with template tags such as {{path}}, {{slug}} and {{collection}}.

    Backend option to customize the templates used to generate commit messages, with template tags such as {{path}}, {{slug}} and {{collection}}.

  • deploy_statusDecap Turbo option, turbo-github only; false disables deploy status, an object with notifications and page disables either.

    Decap Turbo option, turbo-github only; false disables deploy status, an object with notifications and page disables either.

  • display_urlsite_urlAdds a link in the fixed area of the CMS UI back to your main site.

    Adds a link in the fixed area of the CMS UI back to your main site.

  • editorChanges options for the editor view of an entry (preview, raw editing).

    Changes options for the editor view of an entry (preview, raw editing).

  • issue_reportsCustomize the URL offered to users to report CMS errors; by default it links to the Decap CMS GitHub repository.

    Customize the URL offered to users to report CMS errors; by default it links to the Decap CMS GitHub repository.

  • local_backendMakes the local CMS write to a local repository; currently in beta.

    Makes the local CMS write to a local repository; currently in beta.

  • localeenThe CMS locale; languages other than English must be registered manually.

    The CMS locale; languages other than English must be registered manually.

  • logoCustom logo shown at the top of the login page; accepts src (required image URL) and show_in_header.

    Custom logo shown at the top of the login page; accepts src (required image URL) and show_in_header.

  • media_folderRequired setting: folder path where uploaded files are saved, relative to the base of the repo.

    Required setting: folder path where uploaded files are saved, relative to the base of the repo.

  • media_libraryMedia library integration object; needs at least a name property, plus optional config passed to the library in use.

    Media library integration object; needs at least a name property, plus optional config passed to the library in use.

  • nameProperty of the backend field selecting which Decap CMS backend to use; backends ship for GitHub, GitLab, Gitea, Bitbucket, Azure, Git Gateway plus test and the hosted Turbo backends.

    Property of the backend field selecting which Decap CMS backend to use; backends ship for GitHub, GitLab, Gitea, Bitbucket, Azure, Git Gateway plus test and the hosted Turbo backends.

  • public_folderFolder path where media library uploads are accessed relative to the base of the built site; defaults to media_folder with a leading slash.

    Folder path where media library uploads are accessed relative to the base of the built site; defaults to media_folder with a leading slash.

  • publish_modesimpleEnables the Editorial Workflow for more control over the content publishing phases.

    Enables the Editorial Workflow for more control over the content publishing phases.

    values: simple, editorial_workflow or empty string (same as 'simple')

  • repoGit repository the CMS reads and writes, pattern [org-or-username]/[repo-name]; required for github, gitlab, azure, gitea and bitbucket backends, ignored by git-gateway.

    Git repository the CMS reads and writes, pattern [org-or-username]/[repo-name]; required for github, gitlab, azure, gitea and bitbucket backends, ignored by git-gateway.

  • searchtrueSearch loads all collection entries, which can exhaust rate limits on large repositories; set to false to disable.

    Search loads all collection entries, which can exhaust rate limits on large repositories; set to false to disable.

    values: true/false

  • show_preview_linksSet to false to disable deploy preview links.

    Set to false to disable deploy preview links.

    values: true/false

  • site_domainlocation.hostname (or cms.netlify.com when on localhost)Sets the site_id query param sent to the API endpoint; often needed for local development in non-Netlify auth setups.

    Sets the site_id query param sent to the API endpoint; often needed for local development in non-Netlify auth setups.

  • site_urlURL of your published site, used together with a collection's preview_path to create links to live content.

    URL of your published site, used together with a collection's preview_path to create links to live content.

  • slugChanges how filenames for entries and default media library inserts are created and sanitized (encoding, clean_accents, sanitize_replacement).

    Changes how filenames for entries and default media library inserts are created and sanitized (encoding, clean_accents, sanitize_replacement).

    values: encoding: unicode (default) or ascii

  • squash_mergesEditorial workflow option that squashes changes onto the target branch, avoiding the merge commit altogether.

    Editorial workflow option that squashes changes onto the target branch, avoiding the merge commit altogether.

    values: true/false

  • turbo_site_idRequired for the turbo-github / turbo-gitlab backends: the site's UUID from the Decap Turbo dashboard.

    Required for the turbo-github / turbo-gitlab backends: the site's UUID from the Decap Turbo dashboard.

More in Headless CMS

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…