RSTRust-First Site ToolkitA Rust-first static site generator with typed collections, explicit routes, and a format-agnostic asset pipeline.

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(...) and collection_page(...) create page-like outputs

  • generated_routes(...) can create either page-like outputs or explicit flat files

  • file(...) 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::Text written to /events.log

  • Artifact::Json written to /feed.json

  • Artifact::Json written to /api/latest through file(...)

  • Artifact::Xml written 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.