Auto-generated API Docs with Starlight TypeDoc
If you maintain a TypeScript project, keeping API documentation in sync with code is challenging. starlight-typedoc seamlessly integrates TypeDoc generated documentation into your Starlight sidebar.
Why use it?
Section titled “Why use it?”- Automation: Generates markdown notes from your TypeScript source.
- Integration: Pages appear natively in your Starlight structure.
- Type Safety: Documentation that accurately reflects your types.
Configuration
Section titled “Configuration”It requires typedoc and the plugin:
npm install typedoc starlight-typedocimport starlightTypeDoc from 'starlight-typedoc';
// ...plugins: [ starlightTypeDoc({ entryPoints: ['./src/index.ts'], tsconfig: './tsconfig.json', }),],This will automatically create a new section in your documentation for your API reference!