Sierra guide / Building
After the build
When vite build finishes, Sierra writes the files a site needs beside the pages: the 404, a sitemap, redirects, robots.txt and the rest. Most are switched on by one config key.
// config/sierra.config.js
export default {
target: 'static',
siteUrl: 'https://example.com',
llms: true,
markdownPages: true,
plugins: [{
name: 'stamp-build',
closeBundle({ outDir }) {
console.log(`built into ${outDir}`)
},
}],
}
What else it can do
404/index.htmlbecomes404.htmlon every buildsitemap.xmllists the routes that areindexed_redirectscollects routes withredirect:and the app's own filellms.txtand a per-pageindex.mdfollowllmsandmarkdownPages- Speculation Rules prerender a same-origin link on hover in a static build
- A theme gets an inline script in
<head>that applies the saved choice before first paint - A manifest is graded, never written, and the build says whether a browser will install the app
- A plugin's
closeBundleruns once with{ outDir, root, config, routeTable }after the pages are written build.deferJSaddsdeferto script tags
In depth: README § Post-build pipeline