Project structure
Keep your content, assets, and configuration inside the docs project. A project with a custom homepage and documentation versions might look like this:
docs/
docskit.config.ts
package.json
content/
index.md
guides/
installation.md
api-references/
index.md
components/
homepage.tsx
mdx-components.tsx
styles/
theme.css
public/
logos/
logo.svg
versions/
versions.json
v1.0.0/
content/
navigation.json
.docskit/ # Generated working directory
dist/ # Generated static site
Only the starter files are required at first. Add components, styles, API pages, and snapshots when your site needs them.
Files you edit
docskit.config.ts sets site identity, navigation, branding, and optional module
paths. Keep it declarative because the same configuration is used on the server
and in the browser.
content/ contains .md pages. content/index.md supplies /docs/.
Folders become route segments; content/guides/installation.md supplies
/docs/guides/installation/. API pages under content/api-references/ use the
separate /api-references/ route.
components/ and styles/ are suggested locations for your React components and
CSS. Docskit loads only the modules you select in the config. A file named
components/homepage.tsx becomes the homepage after you set
homepage: "./components/homepage.tsx".
public/ contains assets copied into the static site. Reference
public/logos/logo.svg as /logos/logo.svg in configuration or Markdown.
Branding covers light and dark variants.
versions/ stores committed snapshots and their publication state. Create it
with the versioning commands; keep editing
content/ for Next.
Generated directories
The CLI creates .docskit/ for its runtime, route files, dependency links, and
intermediate builds. Configure the site through your source files. Changes made
inside .docskit/ are replaced when the CLI prepares the site again.
dist/ contains the static files you upload to hosting. It includes the search
index and route payloads as well as HTML and styles.
Commit source files and snapshots. Add these entries to the docs project's
.gitignore:
node_modules/
.docskit/
dist/
The starter already includes these rules. If another tool generates your API pages, decide whether to commit those pages or regenerate them before every docs command. This repository regenerates its current API pages and commits their release snapshots.