Author a complete page
rust
use pliego_dom::{IntoView, el};
use pliego_ssg::{Head, Page};
let page = Page::new(
"/guide",
Head::new("Guide | My App")
.description("A complete authored page.")
.canonical("https://example.com/guide"),
el("main")
.child(el("h1").child("Guide"))
.into_view(),
);A Page owns its route, Head, body, and optional language. PliegoRS emits useful HTML directly; routing does not begin as a client-side application shell.
Route normalization
Clean routes publish to index documents. /guide and /guide/ resolve to guide/index.html. Distinct authored routes that normalize to the same portable output are rejected before staging.
Metadata and canonical identity
rust
Head::new("My page")
.description("A precise description.")
.canonical("https://example.com/my-page")
.icon("/favicon.svg")
.manifest("/site.webmanifest")
.meta("robots", "index, follow")
.property_meta("og:type", "website")Authored error pages
Every maintained starter emits /404.html. The preview server returns that document with HTTP 404 for unknown routes. If it is missing, PliegoRS serves a branded fallback that explains how to add one.
rust
site.page(Page::new(
"/404.html",
error_head("Route not found"),
not_found(),
));