@docvia/core
Everything that runs where your docs are served: config and plugin API, IR, Markdown, rendering, sources, SSR, and the React and Svelte bindings.
On this page
@docvia/core is the part of docvia that runs where your docs are served, in a Cloudflare Worker, a
browser or Node. It uses no Node APIs, and a test fails the build if one appears. Build tooling that does
need Node (scanning files, loading docvia.config.ts, the Vite and Next.js plugins) is in
@docvia/build.
Install
pnpm add @docvia/core
React and Svelte are optional peer dependencies: install the one your app uses.
Subpaths
| Import | Contents |
|---|---|
@docvia/core | IR and config types, docviaError, the plugin API (defineConfig, PluginRunner). |
@docvia/core/markdown | parseMarkdown and markdownToIR, the pipeline every mode shares. |
@docvia/core/schema | Frontmatter extraction and validation. |
@docvia/core/render | The rendering engine; /render/client installs copy buttons and code tabs. |
@docvia/core/source | loader(), the page tree; /source/macro has defineDocs(). |
@docvia/core/ssr | Request-time rendering. |
@docvia/core/react | The React bindings; /react/client hydrates islands. |
@docvia/core/svelte | The Svelte bindings; /svelte/node is the build-time renderer. |