Decap CMS & Astro
Decap CMS (formerly Netlify CMS) is an open-source, Git-based content management system.
Decap allows you to take full advantage of all of Astro’s features, including image optimization and content collections.
Decap adds a route (typically /admin
) to your project that will load a React app to allow authorized users to manage content directly from the deployed website. Decap will commit changes directly to your Astro project’s source repository.
Installing DecapCMS
Section titled Installing DecapCMSThere are two options for adding Decap to Astro:
-
Install Decap via a package manager with the following command:
Terminal window npm install decap-cms-appTerminal window pnpm add decap-cms-appTerminal window yarn add decap-cms-app -
Import the package into a
<script>
tag in your page<body>
/admin <body><!-- Include the script that builds the page and powers Decap CMS --><script src="https://unpkg.com/decap-cms@^3.1.2/dist/decap-cms.js"></script></body>