A six-page Astro site in English, Polish and German, built one locale at a time.
(cd ../.. && npm install) # the package's dev tools, for its prepare script
npm install
npm run buildnpm run build runs astro-split-build --config split-build.config.js, which:
- runs
astro buildthree times, withBUILD_LOCALEset toen,planddein turn; - merges the three builds into
dist/: English at the root, thenpl/andde/; - checks the merged pages in one pass:
- every
/_astro/…bundle a page references exists; - every internal link, canonical and hreflang alternate resolves to a built page, and the alternates link back;
- every page has a
<title>, a custom check defined in the config.
- every
The locale filter is in src/pages/[...path].astro's getStaticPaths(). astro dev ignores it and renders every locale.