Content Management

Setup Decap CMS

How the Decap CMS config maps to JSON and Markdown collections, and what to edit for the code-only edition.

Where the config lives

Decap CMS reads its config from:

static/admin/config.yml

The admin page itself is:

static/admin/index.html

The admin page loads Decap CMS from a CDN and reads config.yml from the same folder.

How collections map to files

Every collection in config.yml points to a folder or file in the repository.

  • site → src/lib/data/site.json, navbar.json, footer.json
  • pages → src/content/home/index.md, about/about.md, contact/contact.md
  • legal → src/content/legal/*.md
  • services → src/content/services/*.md
  • blog → src/content/blog/*.md
  • services_config → src/content/services/_index.md
  • blog_config → src/content/blog/_index.md

Each collection has its own fields. That is intentional. A CMS exposes a messy content model, so the model has to be separated first.

Edit JSON data first

Start with the site collection. It holds:

  • Site config — site name, URL, locale, brand, Twitter handle, theme color.
  • Navigation — nav links and the action button.
  • Footer — footer description, status, columns, copyright, legal links.

These are the values every page uses. Set them before editing pages.

Code-only edition: edit JSON directly

If you bought the code-only edition, you do not have Decap CMS. Edit the same files by hand:

  • src/lib/data/site.json
  • src/lib/data/navbar.json
  • src/lib/data/footer.json

The structure is the same. The only difference is the editing interface.

Edit pages

The pages collection holds:

  • Home — hero, mockup, marquee, features, steps, pricing, testimonials, FAQ.
  • About — page header, stats, mission, team.
  • Contact — page header, contact info, form fields.

Open the page you want to edit, change the fields, and save. Decap writes the changes to the corresponding Markdown frontmatter.

Edit list pages

The services_config and blog_config collections hold the list page config:

  • SEO — title, description, Open Graph, Twitter card, canonical.
  • Header — eyebrow, title, description.
  • Pagination — per page, previous label, next label.
  • Filters — blog category filters.

These are separate from the individual service and blog entries. Editing them does not touch the content entries.

Why preview is off

Each content collection has:

editor:
  preview: false

Decap's preview pane does not render Svelte components. Leaving it on shows a broken preview. Turning it off keeps the editor focused on fields.

Next step

Read Update Services for the services workflow.