module

Plombir::Build::Pipeline

Runs every stage in order and returns the Result.

result = Plombir::Build::Pipeline.run(Plombir::Build::Context.new("/sites/blog"))
result.pages # => 3

Class methods

build_extras(entries : Array(Entry), routes : Hash(String, Router::Route), collections : Hash(String, Renderer::Page::Value)) : Array(Extra)

Builds pagination siblings for entries with paginate:. Page 1 renders in place; pages 2..N generate extra routes. Invalid paginate: values raise Frontmatter::Error with file:line; URL clashes raise Router::Conflict.

Source
build_taxonomy(entries : Array(Entry), routes : Hash(String, Router::Route), context : Context, extras : Array(Extra) = [] of Extra) : Array(TaxoPage)

Builds taxonomy archives gated on layout presence (see ADR-008): term pages need layouts/tag.html / category.html, indexes need layouts/tags.html / categories.html. No layouts or no terms emit nothing, so existing builds stay byte-identical. URL clashes with content, pagination, or taxonomy raise Router::Conflict.

Source
collection_vars(entries : Array(Entry), routes : Hash(String, Router::Route)) : Hash(String, Renderer::Page::Value)

Builds the collections.<name> template vars: per-collection rows newest-first by effective date (explicit date:, else the file mtime per ADR-002) with title/url/excerpt/date. The Phase-3 stub for template listings — full query helpers arrive with the Phase-4 engine.

Source
copy_public(context : Context) : Nil

Copies public/ as-is, last, merging file-by-file so it wins over generated files (fingerprinted assets, HTML) on collision. A top-level cp_r would nest (dist/assets/assets/…) once the asset stage created dist/assets/; the recursive merge keeps public/assets/style.css → dist/assets/style.css exact.

Source
discover(context : Context) : Array(Entry)

The stages below are internal (Incremental reuses them per affected subgraph) but not private: dev renders single pages through discover + resolve + render_one without rerunning the full pipeline.

Source
guard_output!(context : Context) : Nil

Refuses outputs that would delete the site itself: the root, or anything containing the sources (including / or --output .).

Source
process_assets(context : Context) : Assets::Pipeline::Result

Fingerprints assets/ into the output directory and writes the manifest. Runs before rendering so | asset_url and the rewrite pass resolve against it, and before copy_public so public/ wins collisions (with a warning carried on the Result).

Source
render_one(entry : Entry, route : Router::Route, context : Context, collections : Hash(String, Renderer::Page::Value) = {} of String => Renderer::Page::Value, partials : Renderer::Page::Partials | Nil = nil, components : Renderer::Page::Components | Nil = nil, assets : Hash(String, String) = {} of String => String, missing : Array(String) = [] of String, paginator : Hash(String, Renderer::Page::Value) = {} of String => Renderer::Page::Value, content_data : Hash(String, Content::Data::Value) = {} of String => Content::Data::Value) : String

Renders one page: Markdown body plus layout with page fields. collections carries the collections.* template vars, so index pages list their siblings with no custom code. It defaults to empty so single-page callers stay simple. partials and components default to loading from the context directories on demand; the full pipeline passes prebuilt maps instead. assets is the fingerprinted-asset manifest for | asset_url and the /assets/… rewrite; refs backed by neither assets/ nor public/ are collected into missing for the caller to warn about. paginator carries paginator.* vars for paginated listings (empty otherwise); content_data carries data.* + site.data.* vars (empty without _data/).

Source
resolve(entries : Array(Entry), patterns : Hash(String, String) = {} of String => String) : Hash(String, Router::Route)

Maps every entry to its pretty URL, raising Router::Conflict when two pages claim the same URL. Explicit frontmatter wins; otherwise the collection patterns expand (conventional URLs when absent).

Source
run(context : Context = Context.new) : Result
Source

Nested types