Installation
Install svedocs in a new project or add it to an existing SvelteKit app.
New project
Shellpnpm create svedocs my-docs cd my-docs pnpm install pnpm dev
This path scaffolds the app, the docs theme, the CLI entry points, and the default content structure in one step.
Existing project
Shellpnpm add svedocs pnpm add -D svedocs-cli
Then wire the package into vite.config.ts, svelte.config.js, and your root layout:
TypeScriptvite.config.tsimport { svedocs } from 'svedocs/vite'; import svedocsConfig from './svedocs.config'; export default { plugins: [ svedocs({ config: svedocsConfig }) ] };
Sveltesrc/routes/+layout.svelte<script> import 'svedocs/theme/styles.css'; </script> <slot />
First run
- Create
svedocs.config.ts. - Add your content under
content/docs. - Start the dev server and open
/docs. - Add search and Ask AI once the content tree is in place.