How the Netlify CLI documentation is generated
mainThe documentation site is an Astro Starlight project that uses an automated pipeline to keep command references in sync with the CLI source code. The flow is as follows:
- Extraction: The
docs.jsscript extracts command information from the CLI code and replaces content between auto-generation marker comments in the manual files located in../docs/. - Synchronization: The
sync.jsscript copies these generated files into the Astro site's content directory atsrc/content/docs/, performing minor transformations if necessary. - Rendering: The Astro/Starlight engine renders the files into the final documentation site.