Standardmäßig statisch, Islands nur wo nötig, kein JavaScript auf Inhaltsseiten.
Constitution — Astro content site
Version 1.0.0 · Ratified 2026-11-10
These principles hold for every spec, plan and task of the project. A spec may add rules; it never weakens these.
-
Static by default. Pages are prerendered at build time. A route rendered on demand (
export const prerender = false) needs a reason in the plan, such as per-request data. -
Islands only where needed. A component gets a
client:*directive only when it is interactive, and the plan says why.client:visibleorclient:idleis preferred;client:loadneeds a reason. -
Zero JavaScript on content pages. Articles, docs and landing content ship no
<script>at all. A CI check overdist/fails the build when a content page loads JavaScript. -
Typed content collections. Content lives in collections with a zod schema in
src/content.config.ts. Invalid frontmatter fails the build instead of rendering a broken page. -
Fast and accessible. Images use
<Image />fromastro:assetswith alt text, and Lighthouse scores at least 95 for performance and accessibility on every template. LCP stays under 2.5 s on mobile.