Guides
Docs-first applications
Make the whole application documentation by mounting Doqs at the root.
A docs-first application has no landing page of its own: the documentation index is the home page and documents live at /<slug>.
pnpm exec doq init --mode docs-first
export const doqPaths = { contentDirectory: 'docs', basePath: '/' } as const;
| File | URL |
|---|---|
src/content/docs/introduction.md |
/introduction |
src/content/docs/guides/setup.md |
/guides/setup |
| (index) | / |
Rules for the root mount
- Do not add
src/app/pages/index.page.ts; the documentation index owns/. - Pass
doqPrerenderRoutes(doqPaths)without a leading'/': withbasePath: '/'the helper already includes the index route. DoqShellComponentis an optional neutral header and footer for projects that have none. It takesdocsPath="/"in this mode.- Archived versions, when used, live at
/v/<id>.
Note
doq init --mode docs-first accepts only the root mount. For any other path, use embedded mode with --base-path.