DecapCMS with Astro: The Ideal Serverless CMS Solution for Static Content

Daniel Rod


As a developer, choosing the right content management system (CMS) for your website can be a challenging task, especially with the vast number of options available in the market. I recently faced this challenge and considered several popular CMS platforms, including WordPress, Strapi, Storyblok, and Sanity.io. After evaluating their features, performance, and overall user experience, I decided to go with DecapCMS using Astro for my static content-focused website. In this blog post, I will walk you through my decision-making process and provide a comprehensive guide on how DecapCMS works with Astro.

Why DecapCMS with Astro?

The primary reason behind my choice was the fact that DecapCMS, combined with Astro, allows me to create a serverless website without compromising on performance or functionality. Most of my content is static, and I wanted a CMS that could provide a seamless experience without the need for a server to host my website. DecapCMS and Astro perfectly fit the bill.

I also considered using Nx or TurboRepo to build a monorepo, but I ultimately decided to use DecapCMS and Astro due to their simplicity and ease of use. My primary goal was to have the best possible experience for managing and publishing content on my website, and this combination proved to be the perfect solution.

Getting Started with DecapCMS and Astro

To begin using DecapCMS with Astro, you’ll need to set up an Astro project and configure DecapCMS as the CMS for your project. Here’s a step-by-step guide to help you get started:

  1. Install Astro CLI and create a new Astro project:
npm install -g astro
astro new my-astro-project
cd my-astro-project
  1. Configure DecapCMS in your Astro project by creating a config.yml file in the /src/admin folder. This file will store the backend settings, site URL, media storage, and content collections.

  2. Update the config.ts schema in your Astro project to match the frontmatter of your blog posts. This ensures that all posts follow the same format and makes it easier to fetch and display content on your blog.

  3. Create blog post entries with the required frontmatter and write your content using Markdown.

  4. Configure your Astro project to fetch content from DecapCMS by updating the astro.config.mjs file.

  5. Use Astro components to render the content on your website.

Why DecapCMS and Astro Outshine Other Options

When compared to other CMS platforms like WordPress, Strapi, Storyblok, and Sanity.io, DecapCMS with Astro offers several advantages:


In summary, DecapCMS with Astro offers a simple, serverless, and high-performance solution for managing and displaying static content on your website. By choosing this combination, you can enjoy the benefits of a serverless architecture without compromising on functionality or user experience. If you’re looking for a CMS that is easy to set up, provides excellent performance, and supports static content, DecapCMS and Astro are the perfect choice for your website.

← Back to Blog