Astro Integration
Astro Legal
Generate comprehensive, production-ready legal policy pages for Astro from a single configuration file at build time.
Usage snapshot
Why this plugin exists
Legal policy pages are essential for compliance, trust, and platform requirements, but they are often inconsistent, outdated, or manually maintained.
Astro Legal solves this by generating deterministic, structured legal documents directly from a single configuration file during the build process.
All policies are rendered as native Astro pages, fully owned by the user, and integrated into the site’s existing layout and routing.
What it delivers
Design principles
- Build-time only — zero runtime or client-side logic
- User-owned output — files are never overwritten
- Required layout enforcement for consistency
- No analytics, telemetry, or tracking
- Deterministic and CI/CD-safe
What this plugin does
- Generates multiple legal policies from a single config file
- Scaffolds Astro pages under a configurable base path
- Injects organisation and contact metadata consistently
- Fails closed when configuration is invalid
- Runs automatically during astro dev and astro build
Installation
npm install astro-legal
Configuration, policy selection, and layout setup are handled via the legal.config.json file.
Project links
Source code, releases, documentation, and contribution guidelines.
Want the deep dive?
Read the FAQs for implementation details, design rationale, and integration guidance.
View plugin FAQs