Skip to content
svedocs

Quick Start

Create your first svedocs site, learn its project structure, and prepare it for production.

svedocs handles the documentation-specific parts of a SvelteKit app: Markdown content, routes and navigation, theming, search, Ask AI, SEO, Open Graph images, content checks, and Cloudflare deployment.

The quickest way to get familiar with it is to generate a project and replace the sample pages with your own.

Create a site

Shell
pnpm create svedocs my-docs --template docscd my-docspnpm installpnpm dev

Open the local URL printed by the dev server. The docs template is ready to use: it includes sample pages, local search, an Ask AI route that works without credentials, sitemap and robots routes, and Open Graph images.

Use a smaller template when you want less surface area:

TemplateUse it when
minimalYou want a small SvelteKit docs shell and plan to add integrations later.
docsYou want search, Ask AI, SEO, and OG routes set up from the start.
cloudflareYou plan to deploy to Cloudflare Pages and want Wrangler bindings from the start.

What's included

LayerWhat it does
ContentReads Markdown, MDX-style, and SVX files, including frontmatter, headings, and links.
NavigationBuilds sidebars, previous/next links, localized routes, and page outlines from the content tree.
ThemeProvides a Svelte theme, Tailwind CSS v4 variables, light/dark modes, code blocks, diffs, callouts, forms, and docs layouts.
SearchCreates page and section records for local MiniSearch, Algolia, Typesense, and Cloudflare AI Search.
Ask AIUses search records as citations and supports local answers, Cloudflare AI Search, Workers AI, and OpenAI-compatible services.
SEOGenerates canonical URLs, language alternates, JSON-LD, sitemap, robots, and OG images.
CLICreates, checks, builds, indexes, upgrades, and deploys documentation projects.

Project anatomy

A generated project stays small:

Text
my-docs/ content/ docs/ index.md pages/ index.md src/routes/ [...path]/+page.svelte api/search/+server.ts api/ask/+server.ts og/[...path]/+server.ts sitemap.xml/+server.ts robots.txt/+server.ts svedocs.config.ts vite.config.ts svelte.config.js

Most day-to-day work happens in content/docs, content/pages, and svedocs.config.ts. The route files mostly connect data generated by the Vite plugin to the theme and server endpoints, so you rarely need to edit them.

Write your first page

Create content/docs/getting-started.md:

---
title: Getting Started
description: Learn the first workflow in this product.
order: 2
---

# Getting Started

Use this page to explain the first successful path.

## Install

```sh
pnpm add your-package
```

svedocs maps the file to /docs/getting-started, adds it to the sidebar, extracts Install for the page table of contents, and creates search records for both the page and section.

Development workflow

Keep these commands running as part of the writing loop:

Text
pnpm devpnpm checkpnpm build

svedocs check catches missing descriptions, duplicate routes, duplicate canonical URLs, broken internal links, missing anchors, missing assets, translation gaps, and package export issues when requested.

Production checklist

Before shipping a public docs site:

  • Set site.name, site.title, site.description, and site.url.
  • Give every important page a unique description.
  • Run svedocs check --strict.
  • Decide whether the site should build as edge, static, or spa.
  • Configure search and Ask AI providers only after local content is stable.
  • Keep secrets in environment variables or .dev.vars, never in committed docs files.
  • Generate or route OG images for pages that will be shared publicly.

Where to go next

  • Installation: add svedocs to a new or existing SvelteKit app.
  • Writing: learn the content model, frontmatter, Markdown features, and SVX authoring.
  • Configuration: tune metadata, routing, theme, search, AI, SEO, checks, and Cloudflare settings.
  • Integrations: connect search, Ask AI, Cloudflare, SEO, and OG routes.
  • CLI: use the command surface for build, checks, indexing, OG assets, deployment helpers, and upgrades.