A Markdown CMS with a web editor and Git
An editor changes the opening hour on a site. A developer reviews that same change in Git. With Pushword’s Flat extension, both work on a page that can travel between the browser editor and a plain Markdown file with YAML front matter.
Pushword serves the live page from a Doctrine database. SQLite is the default, and Flat syncs the page with files on disk. A static export can then serve the generated HTML on a host that only needs the output files.
Follow one page through the editor and Git
Use a new local Pushword installation, which includes Flat and the static generator. In config/packages/pushword.yaml, set the host and tell the generator to copy media and assets into the export.
pushword:
apps:
- hosts: [127.0.0.1]
base_url: 'http://127.0.0.1:8004'
static_symlink: false
Run the local server with php -S 127.0.0.1:8004 -t public/. Create the directory content/127.0.0.1 and save the following as repair-night.md. The filename becomes the page URL. The past date makes the sample page public after import.
---
title: Repair night at the community workshop
publishedAt: '2025-01-15 18:00'
---
Doors open at 18:00.
Bring the item you want to repair.
php bin/console pw:flat:lint 127.0.0.1
php bin/console pw:flat:sync 127.0.0.1 --page=repair-night --mode=import
In a Git checkout, stage the sample file as your baseline with git add content/127.0.0.1/repair-night.md. In the admin, open the page and change the sentence to Doors open at 18:30. Save it, then export the page to see the change on disk.
php bin/console pw:flat:sync 127.0.0.1 --page=repair-night --mode=export
git diff -- content/127.0.0.1/repair-night.md
The export also writes CMS metadata. Here is the content change in the diff.
-Doors open at 18:00.
+Doors open at 18:30.
Edit the file to say Doors open at 19:00. Run the lint and import commands again. The new time appears on /repair-night and in the admin. Generate the site to check that the static HTML shows the same time.
php bin/console pw:static 127.0.0.1
With the default output path, find the page in static/127.0.0.1/repair-night.html. Copy the whole output directory if you serve it on a separate host. Static generator settings
Decide how the site gets published
Run the deferred export worker to write admin saves to disk. Commit the diff yourself or configure automatic Git commits.
If both copies change between syncs, Flat keeps the newer version and saves the other as a conflict file. Use editorial locks to coordinate edits across the admin and files. Git deployment and locks
Treat the Markdown directory as part of your backup. Back up the database and media as well if you need to restore the running site. User accounts or extension data may have their own storage and backup requirements. Flat sync and backups
Storage trade-offs in other flat-file CMSs
| If your project needs this | Start here |
|---|---|
| Files as the live content store on a PHP host | Grav stores content in files and includes a browser admin. Typemill also keeps content in files and has separate draft and published Markdown files. |
| Markdown and a control panel in a Laravel project | Statamic runs on Laravel and can serve dynamic pages from its files. Automatic Git commits from the control panel are a Pro feature. |
| A Symfony application with editorial pages | Pushword combines a Doctrine-backed site with Markdown files you can review in Git. The Symfony CMS walkthrough adds a typed field to that setup. |
If the file round trip fits your project, install Pushword locally and run it on a page you maintain. Check the exported Markdown against the original before you move the rest of the site.