Look up exact behavior
Route shapes and artifacts
Understand how route registration, output paths, and artifact kinds fit together.
Route shape and artifact type are separate decisions
One of the core design choices in this framework is that route shape and artifact kind are not the same thing.
Route shape decides where bytes go
Route registration controls the output path:
page(...)andcollection_page(...)create page-like outputsgenerated_routes(...)can create either page-like outputs or explicit flat filesfile(...)always keeps the literal output path
The site-level page output policy then chooses whether page-like routes become:
/slug/index.html/slug.html
Artifact kind describes the bytes
Artifact kind describes what the route emitted:
HTML
XML
JSON
text
This means all of the following are valid:
Artifact::Textwritten to/events.logArtifact::Jsonwritten to/feed.jsonArtifact::Jsonwritten to/api/latestthroughfile(...)Artifact::Xmlwritten to/sitemap.xml
Keeping these concerns separate avoids overloading the type system with filename policy.
Generated route metadata makes indexes practical
When one route needs to inspect other routes, use route metadata rather than string prefixes:
add attributes with
with_attribute(...)attach source entries with
with_source_entry(...)query them later through
ctx.routes()
That gives indexes, feeds, and taxonomy pages a stable way to find the routes they need.