An accessibility-first, metadata-driven static site generator. Markdown in, an accessible website out — WCAG-aware output by default, plus a metadata layer (Gnosis) that renders pages from typed project data. The Haskell member of poly-ssg.
Note
Status: alpha. The build / clean pipeline works and generates
real sites. Items marked Planned below are not yet implemented. The
engine’s direction — demote Pandoc, adopt a Djot prose core + a2ml
typed content on the
boj substrate — is
recorded in ADR-0001.
Architecture & invariants: EXPLAINME.
A minimal site is a tree of Markdown with front-matter:
content/
├── index.md
└── posts/
└── 2026-06-23-hello.md
---
title: Hello, world
date: 2026-06-23
tags: [intro]
description: A first page built with casket.
---
# Hello
Markdown with **rich** formatting, tables, footnotes and highlighted code.Build it:
casket-ssg build ./content ./_siteYou get an accessible _site/ with no configuration:
-
index.htmlandposts/2026-06-23-hello/index.htmlrendered through an accessible default theme (skip link, labelled landmarks, light/darkcolor-scheme), with table headers auto-scoped for WCAG 1.3.1; -
a date-sorted collection index for
posts/, and per-tag pages under/tags/; -
sitemap.xmland an Atomfeed.xml.
No Node, no npm, no required config file.
casket is not yet on Hackage — build from source (GHC 9.4+, Cabal 3 or Stack 2):
git clone https://github.com/hyperpolymath/casket-ssg
cd casket-ssg
stack build # or: cabal build
stack run casket-ssg -- --version # or put the built binary on PATHCLI:
casket-ssg build <input-dir> [output-dir] # default output: _site
casket-ssg build --drafts <input-dir> # include draft: true pages (or CASKET_DRAFTS=1)
casket-ssg build --no-clean-urls <input-dir> # emit foo.html, not foo/index.html
casket-ssg clean [output-dir]
casket-ssg --versionAccessibility by construction
The default theme is accessible by default, casket rewrites Pandoc table
headers to add scope="col", and the Gnosis FlexiText type makes
empty alt-text a constructor error — generated badges cannot ship
without alt text. Accessibility is a property of the engine, not a
checklist for the author.
Metadata-driven (Gnosis)
An optional layer renders pages from a typed metadata context:
(:placeholder) substitution, {{#if}} / {{#for}} conditionals and
loops (DAX), and Shields.io badges generated from typed values — sourced
from the repo’s .machine_readable/descriptiles/ data.
Verified & agent-native — the trajectory
casket is heading toward typed a2ml content (build fails on malformed
data), a formally-verifiable Djot core, and a verified agent surface as
a boj cartridge rather
than an embedded MCP server. See
ADR-0001.
Permissively licensed
MPL-2.0 — build proprietary or differently-licensed sites on top,
unlike copyleft alternatives.
Implemented
-
Recursive multi-page build mirroring the source tree
-
Front-matter:
title,date,description,layout,draft,tags,slug, plus arbitrary keys as{{key}}template vars -
Rich Markdown via Pandoc — anchors, pipe tables, fenced/highlighted code, footnotes, task lists, strikethrough, smart punctuation
-
File templates with per-page
layout, partials ({{>name}}),{{nav}},{macro},{{site.*}}(fromsite.conf) -
Collections (date-sorted directory index) and per-tag pages (
/tags/<tag>/) -
sitemap.xml+ Atomfeed.xml -
Accessible default theme + automatic
scope="col"on table headers -
Gnosis layer —
(:placeholder),{{#if}}/{{#for}}(DAX),FlexiTextbadges -
Clean URLs, toggleable
Planned (do not assume these work today — see ADR-0001)
-
initscaffolding and aserve/ live-reload dev server -
Incremental rebuilds; asset fingerprinting
-
a2ml-native typed content + the Djot core; Pandoc relegated to an importer -
bojcartridge registration;llms.txt/ per-page machine views
-
poly-ssg — the family of language-native SSGs casket belongs to, unified via MCP.
-
ddraig — the dependently-typed (Idris2) sibling; casket’s "proven twin" (casket validates, ddraig proves).
-
boj-server — the estate’s verified MCP/capability server casket plugs into as a cartridge.
-
GHC 9.4+ (CI builds with 9.4.8), Cabal 3.0+ or Stack 2.0+
-
Pandoc (current library dependency; see ADR-0001 for the planned move off it)
Code: MPL-2.0 (LICENSE). Prose documentation:
CC-BY-SA-4.0.