bdeshi 6c9a34a8fd add the gallery shortcode and the seam it needed
A feature now learns which bundle is rendering: render.Bundle puts an Origin —
the bundle's directory plus the rooted fs.FS — on the parse context, and
render.OriginFrom reads it back. Available while parsing, not while rendering,
which decides where a feature does its filesystem work: goldmark hands the
context to a block parser and not to a node renderer, so gallery gathers its
filenames at parse time and carries them on the node.

Reads stay inside the site root because Origin passes the fs.FS rather than a
path to join (ADR-0031).

Fragment{Args, Items} lands with it (ADR-0037), so figure's template now reads
.Args.src. Authored arguments and engine-gathered items stay in separate fields:
a src argument beside a src the engine found would otherwise silently pick one.

A gallery is pictures beside the bundle, in filename order, skipping
subdirectories and anything a browser cannot show. Filename order is what makes
the sparse numeric-prefix convention work without numbers in URLs (ADR-0016).

New latent row: the reference theme's images carry no width/height and a
gallery's carry no alt, which is below the output floor conventions.md states.
Nothing can supply either yet — dimensions need the image read, and a filename is
not alt text. Queue 13 computes dimensions and brings structured items with it.
2026-08-01 02:23:35 +06:00
2026-08-01 02:23:34 +06:00
2026-07-30 00:34:18 +06:00
2026-08-01 02:23:34 +06:00
2026-08-01 02:23:34 +06:00
2026-08-01 02:23:34 +06:00

khosra

A flat-file personal publishing engine in Go. Point the binary at a directory of Markdown and it becomes an owned, networked home for fiction, webcomics, art, and essays, in English and Bengali. The site's content lives in its own repository, not this one (ADR-0011).

Build and run

Needs Go 1.26+ and git; nothing else.

make build                      # or: go build -o khosra ./cmd/khosra
make run SITE=/path/to/site     # or: ./khosra -site /path/to/site
make test
make verify                     # everything the project enforces — green before every commit

make help lists targets. make is a convenience wrapper; go build, go test and ./scripts/verify.sh work on their own and are what the gate uses.

A site root is a directory holding content/, and optionally static/ and templates/. It lives in its own repository, not this one — the binary is pointed at it.

If you are a human: start at HARNESS.md — what the scaffolding is, how to use it, and what to decide.

If you are an agent: start at CLAUDE.md — the constitution and the read order. It is loaded for you automatically; this file is not a prerequisite and nothing here is a rule.

S
Description
A personal publishing engine
Readme
1.1 MiB
Languages
Go 89%
Shell 7%
HTML 2.3%
CSS 1%
Makefile 0.4%
Other 0.3%