Docs menu
Getting started
IntroductionInstallationProject structureBuilding pages
RoutingPagesLayoutsStylingMarkdownContent and dataIslandsGoing live
SEO and headDeployingFormsGuides
Build a brochure siteAdvanced
Running as a serverReference
ReferenceGoing live
Deploying
Build a static site and put it on Cloudflare Pages, Netlify or any host.
npm run build
writes the finished site to dist/:
dist/index.html
dist/about/index.html
dist/services/web-design/index.html
dist/404.html
dist/sitemap.xml, dist/robots.txt (when `url` is set)
dist/assets/… CSS and island scripts
dist/images/… from public/
Each page is a folder with an index.html, so URLs stay clean (/about, not
/about.html). Upload dist/ to any static host.
Cloudflare Pages
Connect the repository in the Cloudflare dashboard (Workers & Pages → Create → Pages → Connect to Git), then:
| Setting | Value |
|---|---|
| Build command | npm run build |
| Build output directory | dist |
| Environment variable | NODE_VERSION = 22 |
Every push to the main branch then deploys, and pull requests get preview URLs. Cloudflare
serves 404.html for missing pages, and redirects /about to /about/, so set
trailingSlash = yes in src/site.imba.
The repository must be one Cloudflare's GitHub app can read; for a private repo, grant it access when connecting.
Netlify
Build command npm run build, publish directory dist. Netlify also serves 404.html
automatically. A netlify.toml in the site keeps those settings in the repo:
[build]
command = "npm run build"
publish = "dist"
Things to know
- Content changes need a rebuild. Pages are built once. With Git-connected hosting that's automatic on every push. For a CMS, point its "content changed" webhook at the host's build hook.
- Serve from the root of a domain. Asset links start with
/assets/, so a sub-path likeuser.github.io/repo/doesn't work yet. - Forms need a form service on static hosting. See Forms.