Configuration
Customize your Docstra site using the docstra.config.ts file.
Docstra is fully configurable through the docstra.config.ts file located at the root of your project. This file controls global behavior such as content sources, navigation, feedback integration, and repository settings.
Getting Started
Use the defineDocstraConfig helper from docstra/mdx to enable full TypeScript support and IntelliSense.
docstra.config.ts
Configuration Options
collections
Defines where your documentation content is stored.
| Property | Type | Default | Description |
|---|---|---|---|
collections | Record<string, string> | {} | Maps collection names to content directories. |
Example:
ts
Navbar
Controls the top navigation bar.
navbar.logo
| Property | Type | Description |
|---|---|---|
src | string | Path to the logo image. |
alt | string | Accessible alt text. |
link | string | URL the logo links to (default: /). |
className | string | Optional CSS classes for styling. |
navbar.links
| Property | Type | Description |
|---|---|---|
name | string | Label displayed in navigation. |
href | string | Target URL. |
Example:
docstra.config.ts
Feedback
Enables built-in user feedback collection via FormSync.
| Property | Type | Description |
|---|---|---|
enabled | boolean | Toggle feedback system. |
formSyncFormID | string | Your FormSync form identifier. |
Example:
docstra.config.ts
Thanks to FormSync for providing the feedback system without building your own backend.
Edit on GitHub
Adds an "Edit this page" link to each documentation page.
| Property | Type | Description |
|---|---|---|
owner | string | GitHub username or organization. |
repo | string | Repository name. |
path | string | Path to content inside the repository. |
branch | string | Branch name. |
Example:
docstra.config.ts
Best Practices
- Keep configuration minimal and readable.
- Use environment variables for deploy-specific values.
- Prefer auto-generated sidebar unless you need full control.
- Ensure paths (like
collectionsandeditOnGithub.path) stay in sync.
How is this guide?
Last updated on March 30, 2026