Click the Castor logo or press Ctrl Alt T to change theme.
# Castor Docs Castor Docs is an opinionated documentation generator for the PHP packages maintained under the Castor Labs organisation. It keeps the PHP side deliberately small: no runtime Composer dependencies, no Markdown parser dependency, and no build pipeline beyond one binary. The generated site is static HTML that renders Markdown, highlights code, and searches content in the browser. ## Generate documentation Castor packages are published in the Castor Composer repository rather than Packagist. Add `https://castor-labs.github.io/php-packages` as a Composer repository before requiring this package. ```bash vendor/bin/castor-docs generate --source=.dev/docs --target=.dev/docs-dist ``` The command reads metadata from your package `composer.json`, discovers Markdown pages in `.dev/docs`, fetches Castor ecosystem package metadata, and replaces the target directory with a fresh static site. > [!TIP] > Related-package navigation is generated from the Castor Composer repository and links to each package's Composer metadata URL. ## What gets generated - A package landing page from `.dev/docs/index.md`. - Documentation pages from `.dev/docs/pages`. - Sidebar navigation and previous/next links. - Related Castor package sections. - A static `search-index.json` consumed by the browser.
Castor ecosystem