Skip to content

Commit dde1f1f

Browse files
docs(readme): truth the README to match the actual binary (#43)
## What Aligns `README.adoc` with what the built binary (`CasketGnosis.hs`) actually does — the first cheap slice from ADR-0001's "ship honest first" sequencing. **Removed claims the binary does not implement:** - `casket-ssg init` scaffolding and `casket-ssg serve` / live-reload (the CLI is `build <in> [out]` / `clean` / `--version`) - "compile-time template validation" (templates are runtime string substitution with a built-in fallback) - "schema-enforced frontmatter" (it's a simple `key: value` parser) - "incremental builds" (the build is a full rebuild) - "asset pipeline … hash-based cache busting" (assets are copied verbatim) **Surfaced the real differentiators the old README omitted:** - Accessibility by construction — accessible default theme, automatic `scope="col"` on table headers (WCAG 1.3.1), and `FlexiText` making empty alt-text a constructor error. - The Gnosis metadata layer — `(:placeholder)` substitution, `{{#if}}`/`{{#for}}` (DAX), Shields badges from typed metadata. **Also:** documented the real CLI + flags (`--drafts`, `--no-clean-urls`, `CASKET_DRAFTS`), separated *Implemented* vs *Planned*, set Status: alpha, and linked ADR-0001 for the engine direction. ## Notes - Docs-only; no engine change. - Inherits the two pre-existing `main` reds (Pandoc `HighlightMethod` build break; the 18 Hypatia findings) — neither introduced here. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WN6nPWWe4dvXfoqBG6auWN --- _Generated by [Claude Code](https://claude.ai/code/session_01WN6nPWWe4dvXfoqBG6auWN)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent d0777a3 commit dde1f1f

1 file changed

Lines changed: 74 additions & 34 deletions

File tree

README.adoc

Lines changed: 74 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -19,66 +19,106 @@ image:https://img.shields.io/badge/Philosophy-Palimpsest-indigo.svg[Palimpsest,l
1919

2020
image:https://img.shields.io/badge/RSR-compliant-gold[RSR Compliant,link=https://github.com/hyperpolymath/rhodium-standard-repositories]
2121

22-
**Pure functional static site generator in Haskell.**
22+
**A Pandoc-based static site generator in Haskell, with an accessibility-first, metadata-driven rendering layer (Gnosis).**
23+
24+
[NOTE]
25+
====
26+
*Status: alpha.* The `build` / `clean` pipeline works and generates real sites.
27+
Several items below are *planned, not yet implemented* — they are called out
28+
explicitly so nothing here over-promises. The content engine's direction
29+
(demote Pandoc; adopt a Djot prose core + `a2ml` typed content) is recorded in
30+
link:docs/decisions/ADR-0001-content-engine.adoc[ADR-0001].
31+
====
2332

2433
== Who Is This For?
2534

26-
* **Haskell developers** who want to build sites with tools they know and love
27-
* **Functional programming enthusiasts** who appreciate compositional design
28-
* **Teams requiring reliability** where type safety prevents runtime surprises
29-
* **Anyone frustrated** by dynamic language site builders that fail at deploy time
35+
* **Haskell developers** who want a small, scriptable content-site generator
36+
* **Accessibility-conscious authors** who want WCAG-aware output by default
37+
* **poly-ssg / estate** users who want metadata-driven pages (the Gnosis layer)
3038

3139
== Why casket-ssg?
3240

33-
=== Type Safety That Matters
34-
35-
Your site structure is checked at compile time. Missing templates, broken links, malformed frontmatter - all caught before deployment, not discovered by users.
36-
37-
=== Composable Pipelines
41+
=== Accessibility by construction
3842

39-
Content transformations compose like functions should. Chain markdown processing, templating, and asset handling with confidence that types align.
43+
The built-in default theme is accessible by default — `<html lang>`, a skip link,
44+
labelled `header`/`nav`/`main`/`footer` landmarks, viewport meta, and a light/dark
45+
`color-scheme`. casket also rewrites Pandoc's table headers to add `scope="col"`
46+
(WCAG 1.3.1), and the Gnosis `FlexiText` type makes *empty alt-text a constructor
47+
error* — generated badges cannot ship without alt text.
4048

41-
=== Lazy Large-Site Builds
49+
=== Metadata-driven rendering (Gnosis)
4250

43-
Haskell's lazy evaluation means casket-ssg only processes what's needed. Incremental builds are natural, not bolted on.
51+
An optional layer runs over the Markdown before Pandoc: `(:placeholder)`
52+
substitution from a metadata context, `{{#if}}` / `{{#for}}` conditionals and loops
53+
(DAX), and Shields.io badges generated from typed metadata.
4454

45-
=== Pandoc Integration
55+
=== Pandoc-based content (today)
4656

47-
Best-in-class document conversion with full Pandoc support. Markdown, reStructuredText, Org-mode - your content, your format.
57+
Rich Markdown via Pandoc — anchors, pipe tables, fenced code with syntax
58+
highlighting, footnotes, task lists, strikethrough, smart punctuation. See
59+
link:docs/decisions/ADR-0001-content-engine.adoc[ADR-0001] for the planned move to
60+
a Djot core with Pandoc relegated to a one-shot importer.
4861

4962
== Quick Start
5063

64+
casket-ssg is not yet published to Hackage; build it from source.
65+
5166
[source,bash]
5267
----
53-
# Install
54-
cabal update
55-
cabal install casket-ssg
68+
# Build (Stack or Cabal)
69+
stack build # or: cabal build
70+
71+
# Build a site: build <input-dir> [output-dir] (default output: _site)
72+
stack run casket-ssg -- build ./content ./_site
73+
# ...or, with the built binary on PATH:
74+
casket-ssg build ./content ./_site
75+
76+
# Include drafts (or set CASKET_DRAFTS=1)
77+
casket-ssg build --drafts ./content
5678
57-
# Create a site
58-
casket-ssg init my-site
59-
cd my-site
79+
# Emit foo.html instead of foo/index.html
80+
casket-ssg build --no-clean-urls ./content
6081
61-
# Build
62-
casket-ssg build
82+
# Remove an output directory
83+
casket-ssg clean ./_site
6384
64-
# Preview locally
65-
casket-ssg serve
85+
# Version
86+
casket-ssg --version
6687
----
6788

6889
== Features
6990

70-
* **Compile-time template validation** - broken templates don't build
71-
* **Strong frontmatter types** - YAML parsing with schema enforcement
72-
* **Asset pipeline** - CSS/JS processing with hash-based cache busting
73-
* **Incremental builds** - only rebuild what changed
74-
* **Live reload** - instant preview during development
75-
* **RSS/Atom feeds** - generated automatically from content
76-
* **Sitemap generation** - SEO-ready output
91+
*Implemented:*
92+
93+
* **Recursive multi-page build** mirroring the source tree into the output
94+
* **Frontmatter** — `title`, `date`, `description`, `layout`, `draft`, `tags`,
95+
`slug`, plus arbitrary keys exposed as `{{key}}` template vars
96+
* **Rich Markdown via Pandoc** — anchors, pipe tables, fenced/highlighted code,
97+
footnotes, task lists, strikethrough, smart punctuation
98+
* **File templates** in `templates/` with per-page `layout` and partials
99+
(`{{> name}}`), plus `{{nav}}`, `{{toc}}`
100+
* **Site config** (`site.conf`, simple `key = value`) exposed as `{{site.*}}`
101+
* **Collections** (a directory index sorted by date) and **per-tag pages**
102+
(`/tags/<tag>/`)
103+
* **`sitemap.xml`** and an Atom **`feed.xml`**
104+
* **Accessible default theme** + automatic `scope="col"` on table headers
105+
* **Gnosis layer** — `(:placeholder)` rendering, `{{#if}}` / `{{#for}}` (DAX),
106+
and `FlexiText` (alt-text-required) badge generation
107+
* **Clean URLs** (`foo.md` → `foo/index.html`), toggleable with `--no-clean-urls`
108+
109+
*Planned / not yet implemented* (do not assume these work today):
110+
111+
* `init` scaffolding and a `serve` / live-reload dev server
112+
* Incremental rebuilds (the build is currently a full rebuild)
113+
* Asset fingerprinting / hash-based cache-busting
114+
* Schema-enforced frontmatter and compile-time template validation
115+
* `a2ml`-native typed content and the Djot core (see
116+
link:docs/decisions/ADR-0001-content-engine.adoc[ADR-0001])
77117

78118
== Requirements
79119

80-
* GHC 9.0 or later
81-
* Cabal 3.0 or Stack 2.0
120+
* GHC 9.4+ (CI builds with GHC 9.4.8) and Cabal 3.0+ or Stack 2.0+
121+
* Pandoc (pulled in as a library dependency)
82122

83123
== Part of poly-ssg
84124

0 commit comments

Comments
 (0)