AboutExpertiseWorkR&DBlogStartContact
← Back to R&D

Sardine CMS

A multilingual, static-first CMS framework.

Python · Apache-2.0
Sardine CMS

The engine behind this website, extracted into a reusable framework. Sardine builds multilingual, static-first sites: structured content kept apart from presentation, strong validation before anything ships, and a deterministic build that exports straight to a static host.

What it is

Content lives in JSON and Markdown, in five languages with English as the source. The pieces are the same contracts proven on this site:

  • structured content in JSON and Markdown, separated from presentation;
  • strong validation before publishing: language parity, structure, editorial rules;
  • a deterministic build with static export, ready for Azure Static Web Apps;
  • multilingual SEO from the start: canonical, hreflang, Open Graph, JSON-LD, sitemap and RSS;
  • an authenticated admin with a draft, review, published, archived workflow.

Content is portable by design: JSON and Markdown, no database lock-in. There are four storage engines, SQLite by default and PostgreSQL, MySQL or SQL Server as optional extras. The frontend meets WCAG 2.2 AA.

Install

Requires Python 3.12 or newer. The cms command comes from a single package:

bash
pip install sardine-cms-cli

That pulls the core, the validator and the builder. The reference theme and the browser admin are separate, optional packages. Database engines beyond SQLite are extras of the core:

bash
pip install "sardine-cms-core[postgres]"   # or [mysql], [mssql]

Quickstart

bash
cms init my-site --name "My Site" --base-url "https://my-site.example"
cd my-site
cms seed        # example content in five languages
cms validate    # parity, structure, editorial rules
cms build       # deterministic _site/
cms preview     # serve it locally

cms export writes the build for a target host: Azure Static Web Apps, nginx or a generic server.

How it is organized

The workspace is a set of focused packages: cms-core for the content model and translation states, cms-validation for the rules, cms-build for the deterministic generator and themes, cms-cli for the cms command, plus a reference theme and the browser admin. Design lives at the theme level: bring your own.

How to contribute

The repository is open to contributions. Read the CONTRIBUTING.md and the CODE_OF_CONDUCT.md, pick an issue tagged good first issue, and open a pull request. Bug reports and documentation fixes are as welcome as code. Security issues follow SECURITY.md, in private.

You can see it running on the live demo, a fictional aerospace company in five languages, rebuilt and deployed on every merge.