track the demo as a real site in examples/, gated like the docs

The human asked for a demo extensive enough to review by hand, tracked as files,
and kept current the way docs are. Generated filler cannot be reviewed — you cannot
read a Go function and see what a reader sees — so the generator is deleted and
`examples/demo-site/` is an ordinary site: 33 Markdown files, six pictures,
site.yaml, a template override and static files.

My reason for generating it was ADR-0011, and I had that rule wrong: it puts the
*author's site root* outside this repository, not fixtures. conventions.md already
keeps golden files in testdata/, and this is the same category one size up. Keeping
both a generator and files would have been two sources of truth, so one had to go.

Kept true by two gates rather than by good intentions. A table-driven test in
internal/web serves the directory through the real handler with one case per
feature — thirty-five of them, each naming what it proves — and verify.sh runs
`khosra check` over it and fails on anything fatal. Adding a feature now means
adding it to the demo and adding its case, and the build says so if you don't.

Extensive on purpose: eleven dated posts so a section actually paginates, a
four-chapter series so first/last are not the neighbours, a gallery with three
JPEGs and an SVG so both the resampled and the untouched paths show, a Bengali-only
bundle, a titleless status, a draft, a future date, an include, a nested extras
tree, and a typography page that demonstrates what the engine will not do.

Two expectations of mine were wrong and the demo corrected them: the site's own
list template overrides *tag* listings too, so there are no group headings there —
which turns out to be the better demonstration of ADR-0046, since the theme picking
the flat shape is exactly the point. And template literal text is not escaped, so
an apostrophe stays an apostrophe.
This commit is contained in:
2026-07-31 20:08:28 +06:00
parent 4bbc9d44a1
commit 8a2ef082be
55 changed files with 542 additions and 280 deletions
@@ -0,0 +1,6 @@
---
title: দীর্ঘ বর্ষা
date: 2026-03-01
tags: [monsoon]
---
চার পর্বের একটি ধারাবাহিক। কোন লেখা কোন ধারাবাহিকের অংশ, তা ঠিক হয় ফোল্ডারের অবস্থান দেখে।
@@ -0,0 +1,9 @@
---
title: The Long Monsoon
date: 2026-03-01
tags: [monsoon]
---
A series in four parts. Membership is *structural*: every bundle nested under this one is a chapter, so
nothing in frontmatter has to agree with the directory.
Below this text the theme renders the archive — every chapter in reading order, which the engine supplies.
@@ -0,0 +1,6 @@
---
title: Aftermath
date: 2026-03-16
order: 30
---
Chapter three. Nothing here but prose — most chapters are.
@@ -0,0 +1,9 @@
---
title: First Rain
date: 2026-03-02
order: 10
---
Chapter one. `order: 10` puts it first; the gaps between 10, 20, 30 and 40 mean inserting a chapter later is
one edit and never a rename.
This page has no `prev`, so the theme renders nothing where a previous link would go.
@@ -0,0 +1,11 @@
---
title: The Flood
date: 2026-03-09
order: 20
tags: [monsoon]
---
Chapter two, written as a directory bundle so it can own the picture below.
{{< figure src="water.jpg" alt="A wall of grey water" caption="Day three" >}}
It has a chapter on either side, so the sequence nav shows both, plus its position in the series.
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

@@ -0,0 +1,8 @@
---
title: What Remained
date: 2026-03-23
order: 40
tags: [monsoon]
---
Chapter four, and the last. With four chapters the theme's *first* and *last* links have somewhere to go
that is not simply the neighbour.