Skip to content

Deploying a PreactPress site

Ship static HTML to any CDN — set site.url, build, and upload dist/.

Deploying a PreactPress site#

Production builds emit static HTML, assets, sitemap.xml, and optional feed.xml.

Configure the canonical URL#

export default defineConfig({
  site: {
    url: "https://docs.example.com",
  },
  build: {
    sitemap: true,
    robots: true,
  },
});

Build locally#

pnpm run build
pnpm run preview

Upload the dist/ folder to Cloudflare Pages, Netlify, GitHub Pages, or any static host.

WARNING

Always set site.url before enabling sitemap, robots, or RSS — relative URLs break feed readers.