Skip to content
What's new

The build tool for your docs.

docvia compiles Markdown into typed, pre-rendered modules for React, Svelte, and any framework with an adapter. Nothing parses at runtime.

$ npm i -D @docvia/cli
  • MIT licensed
  • Self-host anywhere
  • No vendor lock-in
The docvia compile pipelineParse, transform and cache stages resolve onto the docvia compiler, which emits React, Svelte and static HTML.COMPILEPARSETRANSFORMCACHEREACTSVELTEHTML

Works with the toolchain you already have

Works with Markdown, TypeScript, React, Svelte, Next.js, Vite, and static HTML.

Features

Everything you need to compile docs.

01 · Framework-agnostic

Render the same docs to any framework.

One source, one IR. React and Svelte ship first-party; any other framework needs an adapter, not a rewrite.

ReactSvelteYour adapter
02 · Deploy anywhere

Deploy the build artifact anywhere

No proprietary runtime, no required cloud. The output is static files.

  • Vercel
  • Cloudflare Pages
  • Netlify
  • AWS S3 + CDN
  • Fly.io
  • Self-host
03 · Typed frontmatter

Frontmatter types generated from your Zod schema

Define it once with Zod. docvia generates the matching interface per collection, so a bad field fails the build.

type Frontmatter = {
  title: string;
  tags: string[];
  publishedAt: Date;
};
04 · Incremental builds

Incremental rebuilds gated by a content hash

The key covers source, frontmatter, config, and plugin state. Change one and only the affected pages recompile.

cached intro.md hash match
rebuilt config.md source changed
cached api.md hash match
cached guides.md hash match
05 · Pluggable pipeline

Five hooks. Yours to extend.

Tap any stage of the pipeline. OpenAPI rendering, Mermaid diagrams, and syntax highlighting are all just plugins.

1 beforeParse()
2 afterParse()
3 beforeTransform()
4 afterTransform()
5 beforeRender()
06 · Search

Full-text search, indexed by section

Orama indexes every heading with its body. Run it on the server for a zero-payload index, or ship a static one to the client.

incremental builds AI
Incremental cache
Content-addressable hashing skips…
Build performance
DAG-based rebuilds for…
The pipeline

A compiler, not a renderer.

docvia treats your docs the way a modern bundler treats source code: hash, transform, cache, emit. Six stages, parallelized across cores, gated by a content-addressable cache.

  1. 01
    Read
    Parallel directory walk, xxhash content fingerprints
  2. 02
    Parse
    remark + rehype with cached processor
  3. 03
    Sanitize
    Strict allow-list; scripts and iframes blocked
  4. 04
    Transform
    Single-pass DFS into framework-agnostic IR
  5. 05
    Cache
    Composite hash gates per-file work
  6. 06
    Render
    Per-renderer adapter emits typed module graph
Read the architecture overview
import { defineConfig } from "@docvia/cli";
import { createReactRenderer } from "@docvia/renderer-react";
import { shiki } from "@docvia/plugin-shiki";

export default defineConfig({
  sourceDir: "docs",
  outDir: ".docvia",
  renderer: createReactRenderer(),
  plugins: [
    shiki({ theme: "github-dark", langs: ["typescript", "bash", "json"] }),
  ],
});
typescript · 12 lines react · svelte · any adapter
Use cases

One compiler, many shapes of docs.

API references

Render OpenAPI operations inline from a fenced block. Parameters, schemas, and samples are generated at build time.

GET /api/v2/users

Product documentation

A docs site that lives beside your app code. Same repo, same deploy, same review.

  • ├─ getting-started
  • ├─ guide/
  • └─ packages/

Internal handbooks

Wiki-grade content with the rigor of compiled code. Frontmatter is typed and validated on every build.

--- owner: platform-teamreviewed: 2026-08-01

Tutorials & courses

Long-form content with interactive components embedded through directives.

  • Fundamentals 4 lessons
  • Building 5 lessons
  • Shipping 3 lessons
By the numbers

What the compiler guarantees

0kb Markdown parser shipped to the browser
1 IR Every renderer builds on the same tree
100% Typed end to end, in TypeScript
MIT Open source, self-host anywhere
Quickstart

Zero to compiled in three commands.

bash
  1. 01
    Install the CLI
    pnpm add -D @docvia/cli
    + @docvia/cli 1.0.0
  2. 02
    Scaffold docs/ and a config
    npx docvia init --renderer react
    created docs/ · docvia.config.ts
  3. 03
    Compile to a typed module graph
    npx docvia build
    3 pages · .docvia/ ready
Open source

Free, and free to leave.

docvia is a build tool you run yourself, so there is no account to create and nothing phoning home.

MIT licensed

Every package in the workspace: compiler, CLI, renderers, plugins. Vendoring or shipping it commercially is fine.

Developed in the open

Issues, RFCs, and releases all happen on GitHub. Every version ships with a changeset describing what moved.

Built to be contributed to

A renderer adapter is a few hundred lines. If your framework is missing, the contract is small enough to add it yourself.

FAQ

Frequently asked questions.

No. Parsing, sanitizing, and the IR transform all run at build time. The browser gets pre-rendered output. Syntax highlighting is a build-time plugin too, so no highlighter ships either.

Turn your docs into a build artifact.

Open source, MIT licensed, in public preview. Install it now, deploy anywhere, and help shape the v1.0 release.