Skip to content
packages

@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

ImportContents
@docvia/coreIR and config types, docviaError, the plugin API (defineConfig, PluginRunner).
@docvia/core/markdownparseMarkdown and markdownToIR, the pipeline every mode shares.
@docvia/core/schemaFrontmatter extraction and validation.
@docvia/core/renderThe rendering engine; /render/client installs copy buttons and code tabs.
@docvia/core/sourceloader(), the page tree; /source/macro has defineDocs().
@docvia/core/ssrRequest-time rendering.
@docvia/core/reactThe React bindings; /react/client hydrates islands.
@docvia/core/svelteThe Svelte bindings; /svelte/node is the build-time renderer.