Type to search documentation.

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

  1. Run project checks.

    Terminal window
    pnpm check
  2. Build the site.

    Terminal window
    pnpm build
  3. Preview the generated output.

    Terminal window
    pnpm preview

    Open 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:

SettingValue
Install commandpnpm install --frozen-lockfile
Build commandpnpm build
Publish directorydist

Set Astro’s site option to the production origin so canonical URLs, metadata, and generated links use the final domain:

astro.config.ts
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.json URL returns 200.
  • Open a generated .md page when view-markdown is enabled.
  • Check source and edit links against the configured repository branch.
  • Confirm the host serves the generated 404.html page.

Last updated Oct 14, 2026

Contributors