No CMS does not mean no content model

updated 4 min read Augustyn Głowacki

Three stacked blocks share the same vertical alignment.

A solo owner comfortable editing files with a coding agent may not need a CMS. A team of editors still needs a way to preview, review and publish content. A Git-based CMS can provide that editing interface while content stays in the repository. With or without a CMS, I define a content model and validate changes before publishing.

When is a site without a CMS enough?

If one person owns the website, is comfortable working with a coding agent and can review its changes, content in files may be enough. I use that setup for this site. The content model and validation stay in the repository with the pages the agent edits.

When an editor joins, I ask how they will check a preview, approve a draft and publish it. A Git-based CMS such as CloudCannon can provide visual editing while keeping content in Git.

Keep files in Git and give editors a CMS

Keystatic adds an editing interface to content in your codebase. It can save locally or to GitHub. I define the collections and fields in code, then editors use those fields to change the files. Its Astro integration lets the site read that content without moving it into a separate CMS database.

CloudCannon also keeps content in Git and offers visual editing for Astro. Editors can work through its interface while developers and agents use the repository. I choose between these approaches based on the editing experience the team needs and how changes get reviewed and published.

An API-based CMS stores entries outside the website repository. A Git-based CMS keeps them in files with a history of changes. Both need a content model. Keeping content in Git also means agreeing who can approve changes and how a content edit triggers a build.

Why does editing a no-CMS site get painful?

Several companies have asked me through Bejamas for help with sites stored in markdown or YAML files. Editing had become slower within months. They could not tell which file owned a piece of copy, shared sections had diverged, and developers had to explain what fields meant before anyone could change content.

The teams asked which editor, git interface or preview to use. First, I checked what a page was allowed to contain and how those rules were enforced.

Keep the content rules when the CMS goes

A CMS makes editors choose a content type, limits entries to its fields, marks required fields and defines which sections can appear on a page. Teams can lose those rules when they move content into files.

Plain YAML and markdown files do not enforce those rules by default. A typo in a field name can go unnoticed unless the build validates it. I define and check the rules in code.

The rules I put in the build

On this website, every content collection is checked against a Zod schema at build time. Astro generates TypeScript types from those schemas (Astro content collections docs).

  • A page chooses from the section types in a z.discriminatedUnion, from hero to lead form, plus the reference type described below.
  • Every object is a z.strictObject, which rejects unknown keys (Zod docs). A typo in a field name fails the build with a named error.
  • A .describe() string explains each field to the person or coding agent editing it.

For example, a hero section with headline where the schema requires heading fails validation:

sections:
  - type: hero
    slogan: "Structure is the product."
    headline: "Content in files"

Astro 7.2.4 then refuses to sync the collection, and names both halves of the mistake:

[InvalidContentEntryDataError] pages → en/home data does not match collection schema.
  sections.0.heading: Required
  sections.0: Unrecognized key: "headline"

Without z.strictObject, the second line does not exist. The unknown key is discarded, and the error says only that something is missing, not that headline was the thing you typed.

The renderer’s component map is typed satisfies Record<Section["type"], unknown>. Adding a section type without its component causes a compile error.

Share content when it really is the same

I keep a section in its page unless the same content appears elsewhere. An identical call-to-action or trust strip goes into one YAML file in sharedSections. Pages use { type: "sectionRef", ref: "<id>" } to reference it, so one edit updates every page that uses it.

A sectionRef points directly to a shared section and cannot point to another reference. The build also fails if a referenced section was renamed or deleted. These checks keep shared content valid when pages change.

What does this not solve?

Plain content files and a schema do not provide an editing interface on their own. A Git-based CMS can add visual editing and review tools while preserving the file format. A separate headless CMS stores content elsewhere and exposes it through an API. I choose the setup based on how the team edits and publishes.

A coding agent can use the code, content and instructions it has access to. Keeping files together helps it inspect their relationships, and Git records the changes for review. Content stored in a separate CMS needs appropriate API access. CloudCannon’s agent skills help configure its integration. I review the resulting configuration, and editors approve content before publication.

I can help choose and build the editing setup.

Sources

Some of the technology I build with

Tell me what needs to change

  1. Send me your brief

    Share your website, or the task your team repeats, and what you want to change.

  2. Agree the work

    I review the brief and propose a scope and price for you to approve.

  3. Get it done

    I do the agreed work and walk your team through the result.

Augustyn's chatbot

Ask me about my services, projects or how I work.

For questions about my work, this assistant uses the site and its FAQs. Its answers may be limited. AI can be wrong. Avoid personal details. Privacy