Learn by building
Getting started
Understand the workspace layout, the site program, and the build flow before changing code.
Start from the site program
The fastest way to understand this repository is to read it as two layers:
crates/site/is the real website program.crates/site-core/is the library that the website program uses.
The docs site is not a separate demo. It is the same application that exercises the framework in this repository.
What lives where
content/holds authored markdown content and frontmatter.crates/site/defines collections, routes, and markdown components.crates/site-core/exposes the public site-building API.crates/site-assets/handles asset resolution, transforms, and caching.crates/site-diagnostics/provides the shared diagnostic layer.
Read the code in this order
crates/site/src/lib.rscrates/site/src/routes/mod.rscrates/site/src/components.rscrates/site/src/models.rscrates/site/src/main.rs
That order matches how a site author thinks:
define the site
define the routes
define markdown behavior
define frontmatter types
wire the CLI
What happens during a build
When you run cargo run -p site -- build, the program:
builds a
Siteloads typed collections from
content/expands generated route families
renders each route into an artifact
writes outputs into
dist/records incremental state in
.site-cache/
Asset outputs use the same principle. The cache key is based on the source bytes plus a canonical transform description, so unchanged requests can be reused directly.
First small change
Make one safe change first:
edit copy in
crates/site/src/routes/rebuild the site
inspect the generated file in
dist/
Then try a content change:
add a markdown file under
content/blog/rebuild
inspect the new route under
dist/blog/
Where to go next
Continue with Your first site.
Use Work with content images when assets enter the picture.
Use Override markdown components when you want markdown-generated tags to become Rust functions.
Use Post-process routes and assets when cleanup belongs after rendering or asset transforms.
Use Inspect build reports when you need to see what was emitted, skipped, restored, or removed.
Keep Site-building API open when you need exact method names.
Read Build-time and render-time contexts when the phase split feels unfamiliar.