-
Notifications
You must be signed in to change notification settings - Fork 0
Content API
pH7x Systems edited this page Jul 20, 2026
·
1 revision
Opt-in headless output (M6): content_api = true under [build] makes every build also emit versioned JSON under api/v1/, next to the HTML — static files on the same host, no server component.
-
api/v1/site.json—version,name,base_url,blog_path,languages,categories(slug → per-language labels). -
api/v1/<lang>/content.json— one per configured language:articles(id, per-language slug and URL, title, summary, renderedbody_html, date, author, featured flag, category, tags, cover metadata incl.srcset, custom fields) andpages(id, slug, URL, title, description, typed sections with fields and images).
Guarantees: exactly the HTML build's publication, scheduling, trash and language-parity gates; deterministic output (sorted keys, no build timestamps); versioned envelope — additive fields may join within a version, breaking changes move to a new api/vN/ path. The repository's tests/test_content_api.py is the public contract.
Live example: https://sardine.ph7x.com/api/v1/site.json.
Sardine CMS — multilingual, static-first CMS framework · Repository · Live demo · Apache-2.0