Quickstart
Install Dockit, wire its renderer and page discovery, then build a static documentation site. Dockit packages the MDX compiler, Tailwind plugin, and syntax highlighting; React and Vike are installed alongside it as peers.
Requirements
- Node 20+ (Vite 7 requires 20.19 or 22.12+)
- pnpm (any recent version; the DreamLake workspaces pin
pnpm@10.33.0)
Install
Peer versions dockit expects (org convention: sites track react@latest;
the peer ranges are floors, not pins):
| Peer | Range |
|---|---|
react / react-dom | >=19.0.0 — use latest |
tailwindcss | ^4.0.0 — install it directly (pnpm add tailwindcss); peer auto-install does not happen in Netlify's CI pnpm setup (verified empirically) |
vike | ^0.4.210 declared — use ^0.4.260, see below |
vike-react | ^0.5.0 |
@mdx-js/react | >=3.0.0 |
vite | >=6.0.0 (optional — only needed for the /vite plugin factory) |
Dockit nests Vike's plugin inside the dockit() plugin array, and the
vike prerender CLI could not detect a nested plugin before 0.4.260
(verified: 0.4.259 fails, 0.4.260 passes). Dev and vite build work on
older versions — the failure only shows up at prerender time, so pin the
floor now rather than debugging it at deploy time.
Everything else — @mdx-js/rollup, @tailwindcss/vite,
@vitejs/plugin-react, shiki and the remark/rehype plugins — comes in
as dockit's own dependencies. You never install them directly, and the
dockit() plugin factory wires them all. (tailwindcss is declared as a
peer AND belongs in your own dependencies — strict CI installs, Netlify
included, do not auto-install peers, and the shell's classes need it
resolvable at your site root.) If you are porting a site off
the old template, those are exactly the deps you get to delete — see
Migrate an existing site.
Inside a pnpm workspace, depend on the library with
"@dreamlake/dockit": "workspace:*" — this site does exactly that.
See the Netlify monorepo setup for the deploy side.
Verify installation
Site structure
Create the following files:
Already have a docs site on the hand-rolled DreamLake template? Skip this page and follow Migrate an existing site instead — it maps every old file onto the structure below.
1. Vite config
The dockit() factory returns the entire plugin stack — Tailwind v4,
MDX with frontmatter + GFM + shiki dual-theme highlighting, the
?raw-MDX loader, React, and Vike:
2. Site config
initDocs populates the shell's singletons: branding, the page list
(from an eager glob), the raw sources for search, sidebar section
order, and topbar tabs. See SiteConfig for every field,
and the site config guide for how the pieces
fit together.
3. Renderer wrappers
Vike discovers hooks by their +-prefixed filenames, which cannot live
inside a published package — so your site carries three one-liners:
The site.config import must be the first import in both renderer
entries. It runs initDocs as a side effect; if the shell renders
first, the sidebar and search see empty data.
4. Styles
Dockit's stylesheet carries the theme tokens, dark-mode overrides, and
its own @source directive so Tailwind also scans the library's
compiled components. Details in Theming.
5. First page
Run it
That is the whole site. Next, read the authoring guide that make the sidebar build itself.
Deploying your site
The build is fully static, so any static host works: after
pnpm build, publish the docs/dist/client directory (or your docs
package's dist/client). On Netlify, point the site's publish
directory there and enable branch deploys — every pushed branch then
serves a snapshot at <branch>--<site>.netlify.app, which is what
powers versioned docs URLs.
For versioned releases, the package ships a copy-in release kit at
node_modules/@dreamlake/dockit/templates/ — set-version.mjs,
version-branch.sh, versions.example.json, and
netlify.example.toml. Copy them in, fill the marked EDIT ME block
with your Netlify site name, and follow
Releases & versioning for the full flow.
Orient your agents
Use the agent setup fragment to describe your docs layout, authoring conventions, and generated skill to coding agents.