Back to Home
Open linen journal with a fountain pen on a walnut desk
documentation

Editing Content — Markdown and CMS

One content model in two stores: static markdown under content/, and the CMS editor with draft vs live snapshots.

By Farend • Published August 17, 2026

Page copy does not live inside .svelte files. Static sites load content/ (YAML frontmatter + markdown body). CMS sites load D1; seed/reset copies this tree into the database so public pages keep the same fields.

Where each page type lives

Static file CMS type Listed on Home / Grid
content/posts/*.md news yes
content/basic/*.md basic no
content/welcome.md modular home no
content/home/*.md home bands (newsletter, sponsors) no
content/contact.md contact + form fields no

Set type: basic on a standard page so it cannot leak into article listings. Contact uses type: contact and is served at /contact.

CMS editing

On a composed CMS site, open /admin (Cloudflare Access on parked sites). The page editor has Edit and Page settings.

  • Live — the public site matches this version.
  • Save draft — visitors still see the previous live snapshot.
  • Discard draft — restore the last live version in the editor.
  • Publish — freeze the working copy into live_json (what public routes read).
  • Preview — working copy, not the live site.
  • Unpublish / Move to bin — take it off the public site (home cannot be unpublished or binned).

Media uploads go to R2 and show under Images. Unused library files are labelled Orphan on /admin/media.

Frontmatter that listings use

These fields match the CMS editor. Title is the short menu/card label. Headline is the on-page H1 (leave blank to reuse the title).

title: Editing Content — Markdown and CMS
headline: Editing Content — Markdown and CMS
description: One or two sentences for cards and SEO.
date: 2026-08-17
author: Farend
category: documentation
tags: ["cms", "content"]
featured: false
order: 3
heroImage: /images/post-markdown.jpg
heroImageAlt: Descriptive alt text
parent: basic/explore                           # Optional: nest under a dropdown/hero parent
  • headline is the on-page / SEO heading on every page type.
  • category (posts only) is the badge and the home/grid filter chip (documentation, styling, …).
  • tags (posts only) appear on the post and are included in search.
  • heroImage is the grid card cover and the post-page banner. Give every post its own file.
  • order then date control sort order.
  • in_header_menu / nav_type (basic | dropdown | hero) mark a top-level header item. parent nests a page under that item. in_footer_menu is a flat footer link.

Home adds a home: block (badge, buttons, emblem, featured band). Contact adds a form: block (fields, submit label, consent). Those are the same special sections as the CMS page-parts / form-fields editors.

Linking

A file at content/posts/writing-markdown.md is served at /posts/writing-markdown (the filename is the slug — renaming the title does not change the URL).

#cms#markdown#content

Farend Static Template Site

Modular SvelteKit starter — static markdown base, optional Access and CMS add-ons, eight presets, self-hosted fonts.

© 2026 Farend Static Template Site. All rights reserved.