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:
@@ -0,0 +1,4 @@
|
||||
## Method
|
||||
|
||||
Gauge readings, transcribed each evening. *Emphasis and links survive*, because an include is parsed as
|
||||
Markdown rather than pasted as text.
|
||||
@@ -0,0 +1,3 @@
|
||||
First attempt, abandoned. Kept because the process is worth publishing.
|
||||
|
||||
Nested one level deeper, so the extras tree has a directory in it.
|
||||
@@ -0,0 +1,3 @@
|
||||
day one: 2m, rising
|
||||
day two: 3m, holding <not markup>
|
||||
day three: 3m, falling
|
||||
@@ -0,0 +1,4 @@
|
||||
## Research
|
||||
|
||||
Rendered as Markdown *inside* the extras listing, with the tree still beside it. Selecting an entry is an
|
||||
ordinary link and a whole page, so none of this needs JavaScript.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Notes on Water
|
||||
date: 2026-03-25
|
||||
tags: [monsoon, journal]
|
||||
---
|
||||
The finished piece. Below, a part of it lives in a separate file and is included here:
|
||||
|
||||
{{< include file="_method.md" >}}
|
||||
|
||||
That fragment starts with an underscore, so the scanner never treats it as a bundle: it has no URL of its own
|
||||
and appears in no listing. An included file cannot itself include — one level, deliberately.
|
||||
|
||||
This bundle also has an `extras/` directory, so the theme offers a link to it at the foot of the page.
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Typography and Its Limits
|
||||
date: 2026-03-28
|
||||
tags: [journal]
|
||||
---
|
||||
"Quotes become curly," she said -- and dashes become dashes, while an ellipsis... becomes one character. That
|
||||
is the whole of what the engine does to an author's words: a Markdown parser option, nothing more.
|
||||
|
||||
Inside a code span none of it happens: `"quotes" -- and ellipses...` survive byte for byte, because the
|
||||
typographer works on the parsed tree rather than on the text.
|
||||
|
||||
Line breaking is not the engine's business at all. This paragraph is deliberately long enough to wrap several
|
||||
times on a narrow screen, which is where you would notice a lonely last word — and the stylesheet asks the
|
||||
browser to avoid one with `text-wrap: pretty`, because only the browser knows where the lines actually fall.
|
||||
|
||||
A code block, indented.
|
||||
Also untouched.
|
||||
Reference in New Issue
Block a user