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.
This commit is contained in:
@@ -11,6 +11,11 @@ How a feature reaches the engine today: `cmd` builds the list, so nothing under
|
||||
features exist. A feature that must emit markup is handed `render.Partial` and renders through a theme
|
||||
template, because deciding markup is not a feature's job (ADR-0036).
|
||||
|
||||
A feature that needs to know *which bundle* is rendering reads `render.OriginFrom` off the parse context —
|
||||
the bundle's directory plus the rooted `fs.FS`, so a path in a call resolves against the bundle and cannot
|
||||
leave the site root (ADR-0031). It is available while parsing, not while rendering, so anything a feature
|
||||
must read from disk it reads then.
|
||||
|
||||
## The gate
|
||||
|
||||
| Stage of growth | What a feature looks like | Trigger to advance |
|
||||
|
||||
Reference in New Issue
Block a user