Ship and Maintain
Build and Deploy
Validate Dahlia, build static output, and configure a static host.
Dahlia produces a static Astro site. A deployment needs a build command, the
dist/ output directory, and the correct public site URL.
Validate a production build
-
Run project checks.
Terminal window pnpm check -
Build the site.
Terminal window pnpm build -
Preview the generated output.
Terminal window pnpm previewOpen several docs pages, search for a page title, switch language when i18n is enabled, and verify that the previous and next links are correct.
Builds may need network access
Iconify icons and remote embed metadata can be resolved during the build. Make sure the CI environment can reach those providers, or configure an internal Iconify endpoint and use explicit embed metadata.
Host settings
Use these settings on Vercel, Netlify, Cloudflare Pages, or another static host:
| Setting | Value |
|---|---|
| Install command | pnpm install --frozen-lockfile |
| Build command | pnpm build |
| Publish directory | dist |
Set Astro’s site option to the production origin so canonical URLs, metadata,
and generated links use the final domain:
import { defineConfig } from 'astro/config';import dahlia from '@prosefly/astro-theme-dahlia';
export default defineConfig({ site: 'https://docs.example.com', integrations: [dahlia()],});If the whole site is hosted below a path such as
https://example.com/product/, also set Astro’s base. docsBase is different:
it places documentation below a route inside the Astro site, such as /docs.
Verify after deployment
- Open the docs index and one nested page directly, not only through client navigation.
- Confirm the active locale’s
search.jsonURL returns200. - Open a generated
.mdpage whenview-markdownis enabled. - Check source and edit links against the configured repository branch.
- Confirm the host serves the generated
404.htmlpage.