Skip to main content

Crate italic

Crate italic 

Source

Modules§

backlinks
Per-query options for backlink listing. The lookup itself lives on DocIndex::list_backlinks, which reads the cached inverted link graph; this module just owns the options struct that shapes ordering and filtering of that result.
build
The site build pipeline. Stages run in order, each consuming the index the previous stage left behind. marks the embarrassingly parallel (Rayon) stages; the rest are sequential:
command
CLI verb implementations other than build. Each submodule exposes a run(...) entrypoint that lib.rs wraps as the public API surface used by main.rs.
config
copy
Recursive file-tree copy, shared by the build’s static-asset overlay and the scaffold command’s content copy.
doc
doc_index
The in-memory doc store threaded through every build phase. Owns all docs in a BTreeMap<PathBuf, Doc> keyed by id_path — a BTreeMap so iteration is naturally sorted by id_path, giving every consumer a stable order for free. It is the one-stop-shop for doc iteration: phases mutate docs in parallel through DocIndex::par_docs_mut, read them through DocIndex::docs, and project the read-only DocMeta view via DocIndex::to_doc_metas.
frontmatter
html
permalink
query
related
Options + rarity-weighting seam for the related doc-similarity query. The scorer itself lives on DocIndex::related because it reads the inverted taxonomy and link indices; this module owns the Related options struct and the idf seam that shapes scoring.
site_data
taxonomy
Taxonomies: named classifications of docs (Hugo’s model — a taxonomy has terms, each term groups docs). A taxonomy is just a string: the frontmatter field a doc uses to declare its terms, which is also the taxonomy’s name. Taxonomies are declared as an array under the taxonomies: key in config.yaml; there are no built-in defaults (the scaffolded config.yaml declares tags like any other). Each doc carries its term memberships in Doc.terms (taxonomy name → slug → display text); the index inverts those into taxonomy → term → docs for the taxonomy() template function and the taxonomy archives.
tera_env
Tera environments used by the markup and template phases. Each phase gets its own Tera with a curated filter/function set; the submodules under tera_env/ hold the adapters that bridge pure domain logic (query, backlinks, permalink, html) to Tera’s filter/function API.

Functions§

build
clean
new
scaffold
serve
watch