ox-content Svelte Themes

Ox Content

A framework agnostic fastest and beautiful documentation & markdown tooling

Ox Content logo

cargo doc for JavaScript
Rust-powered document generator and high-performance Markdown toolkit

DocumentationGetting StartedPlaygroundSecurity

[!NOTE] Ox Content is an independent personal project by ubugeeei. It is not an official VoidZero project, product, or endorsement. The current branding is an intentional homage to the VoidZero ecosystem because I care a lot about that design direction and hope I can contribute more directly in the future. If VoidZero or the relevant rights holders would prefer that I stop using this branding direction, I will change it.


Features

  • Blazing Fast - Arena-allocated parser with zero-copy parsing
  • mdast Compatible - Run custom mdast plugins and existing remark/unified transforms
  • MDX-ready Files - Process .mdx alongside Markdown in Vite, SSG, and framework integrations
  • GFM Support - Tables, task lists, strikethrough, autolinks, footnotes
  • Multi-Runtime - Node.js (NAPI), WebAssembly, Native Rust
  • Framework Agnostic - Works with Vue, React, Svelte, and more
  • Built-in SSG - Static site generation with theming, search, and OG images
  • Built-in Embeds - Static GitHub repository, source code, and Open Graph link cards
  • API Docs Generation - Generate docs from JSDoc/TypeScript (like cargo doc)
  • i18n - ICU MessageFormat 2 parser, dictionary management, static checker, and LSP
  • Editor Tooling - Markdown/MDC LSP plus VS Code, Zed, and Neovim integrations

Quick Start

Basic Usage (Node.js)

npm install @ox-content/napi
import { parseAndRender } from "@ox-content/napi";

const { html } = parseAndRender("# Hello World", { gfm: true });

Vite Plugin

npm install @ox-content/vite-plugin

@ox-content/vite-plugin already installs the native @ox-content/napi dependency it needs.

// vite.config.ts
import { defineConfig } from "vite";
import { oxContent } from "@ox-content/vite-plugin";

export default defineConfig({
  plugins: [
    oxContent({
      srcDir: "docs",
      outDir: "dist/docs",
      highlight: true,
      ssg: {
        siteName: "My Docs",
      },
    }),
  ],
});

Migrate from VitePress

ox-content-migrate-vitepress .vitepress/config.ts \
  --src-dir docs \
  --out-dir dist \
  --out ox-content.config.ts

The same migration runner is available across JavaScript runtimes:

# Node.js, after installing @ox-content/vite-plugin
ox-content-migrate-vitepress .vitepress/config.ts --out ox-content.config.ts

# Deno
deno run -A npm:@ox-content/vite-plugin/vitepress-migrate .vitepress/config.ts \
  --out ox-content.config.ts

# Bun
bunx --bun @ox-content/vite-plugin .vitepress/config.ts --out ox-content.config.ts

The generated ox-content.config.ts contains an editable OxContentOptions object built from VitePress settings such as title, base, themeConfig.sidebar, themeConfig.socialLinks, themeConfig.footer, and search placeholder. layout: home frontmatter is also accepted for landing pages during SSG/dev rendering.

Browser Usage (WebAssembly)

npm install @ox-content/wasm
import init, { parseAndRender, WasmParserOptions } from "@ox-content/wasm";

await init();

const options = new WasmParserOptions();
options.gfm = true;
options.tables = true;
options.taskLists = true;

const result = parseAndRender("# Hello from WASM", options);
console.log(result.html);

Framework Integration

# Vue
npm install @ox-content/vite-plugin-vue

# React
npm install @ox-content/vite-plugin-react

# Svelte
npm install @ox-content/vite-plugin-svelte

i18n Static Checker (CLI)

# Check for missing/unused translation keys
ox-content-i18n check --dict-dir content/i18n --src src

# Validate an ICU MessageFormat 2 message
ox-content-i18n validate "Hello {$name}"
# Check every link in a tree, exit non-zero on broken targets
ox-content-link-check docs/**/*.md

# Treat `/foo.md` as workspace-rooted under docs/
ox-content-link-check --src-dir docs docs/**/*.md

# Suppress known intentionally-broken targets
ox-content-link-check --ignore "intentionally-broken" docs/**/*.md

Offline-only by design — http:// and https:// links pass through without a network request, so the same binary is safe to run in CI without timeouts, retries, or rate limits.

Editor Tooling

Ox Content now ships a unified authoring and i18n language server:

cargo run -p ox_content_lsp --bin ox-content-lsp

You can wire it into:

Supported features include:

  • fast Markdown snippet completion
  • frontmatter schema completion and diagnostics
  • i18n key completion, hover, go-to-definition, diagnostics, and inlay hints for JS/TS
  • table / code fence / callout insertion commands
  • preview HTML generation for editor UIs (with LSP-pushed HMR)
  • .mdc authoring support with component tag diagnostics
  • asset path completion inside […](, ![…](, and HTML src=/href= attributes
  • dead link diagnostics powered by ox_content_link_checker
  • opt-in textlint integration: on-save diagnostics under source: "textlint"
  • MDC component name and attribute completion when a project provides a component registry

For CI or editor-independent checks, run:

cargo run -p ox_content_mdc_checker --bin ox-content-mdc-check -- docs/page.mdc

Read the full documentation →

Performance

Ox Content is positioned both as a document generator and as a high-performance Markdown toolkit. The numbers below focus on the Markdown engine side.

Latest local benchmark sweep on 2026-05-30 with Node v24.16.0 on an Apple M2 Max. The tables below show median results from 7 local runs of the benchmark harness, covering the 48.7 KB "large" case and a ~1 MB "huge" case. Absolute ops/sec track the host, but the relative ordering between engines is stable.

Parse Only (48.7 KB)

Library ops/sec avg time throughput
@ox-content/napi 3272 0.31 ms 155.72 MB/s
satteri 1682 0.59 ms 80.06 MB/s
md4w (md4c) 670 1.49 ms 31.89 MB/s
md4x (napi) 623 1.60 ms 29.66 MB/s
markdown-it 596 1.68 ms 28.37 MB/s
marked 386 2.59 ms 18.38 MB/s
@mizchi/markdown 41 24.19 ms 1.97 MB/s
remark 27 36.56 ms 1.30 MB/s

Parse + Render (48.7 KB)

Library ops/sec avg time throughput
@ox-content/napi 3738 0.27 ms 177.90 MB/s
md4x (napi) 2270 0.44 ms 108.03 MB/s
md4w (md4c) 1737 0.58 ms 82.67 MB/s
satteri 1043 0.96 ms 49.63 MB/s
markdown-it 481 2.08 ms 22.88 MB/s
marked 327 3.06 ms 15.57 MB/s
@mizchi/markdown 237 4.21 ms 11.29 MB/s
micromark 29 34.76 ms 1.37 MB/s
remark 24 41.92 ms 1.14 MB/s

Parse Only (~1 MB)

Library ops/sec avg time throughput
@ox-content/napi 144 6.92 ms 147.83 MB/s
satteri 54 18.66 ms 54.83 MB/s
md4w (md4c) 32 31.04 ms 32.97 MB/s
md4x (napi) 27 36.37 ms 28.13 MB/s
markdown-it 21 48.49 ms 21.10 MB/s
marked 16 63.16 ms 16.20 MB/s
@mizchi/markdown 1 836.85 ms 1.22 MB/s
remark 1 1839.10 ms 0.56 MB/s

Parse + Render (~1 MB)

Library ops/sec avg time throughput
@ox-content/napi 164 6.08 ms 168.24 MB/s
md4x (napi) 103 9.71 ms 105.41 MB/s
md4w (md4c) 79 12.59 ms 81.24 MB/s
satteri 37 26.70 ms 38.32 MB/s
markdown-it 15 67.75 ms 15.10 MB/s
marked 14 73.27 ms 13.96 MB/s
@mizchi/markdown 10 99.77 ms 10.25 MB/s
micromark 1 817.55 ms 1.25 MB/s
remark 1 1981.80 ms 0.52 MB/s

Ox Content leads every comparison: 1.95× ahead of the next-fastest parser (satteri) on parse-only and 1.65× ahead of md4x (napi) on parse+render at 48.7 KB, and it holds that lead at ~1 MB (2.7× / 1.6×) while sustaining ~148–168 MB/s. The incremental CST parser (@mizchi/markdown) and the unified/remark and micromark pipelines fall to ~1 op/sec at 1 MB. See node benchmarks/bundle-size/parse-benchmark.mjs for the full sweep across small, medium, large, and ~1 MB inputs.

Run the benchmark with:

node benchmarks/bundle-size/parse-benchmark.mjs

The script compares against satteri, @mizchi/markdown, md4w (md4c), and md4x (napi) by default, and includes Bun.markdown.html automatically when bun is installed.

Development

nix develop           # Enter the pinned dev shell
vp install             # Install JS dependencies through Vite+
vp fmt                 # Format Rust and JS/TS sources
vp check               # Check Rust and JS/TS sources
vp dev                 # Start the docs and playground dev servers
vp build               # Build Rust, npm packages, docs, and playground

The dev shell is pinned in flake.nix, the workspace task graph lives in vite.config.ts, and .node-version is kept for CI / non-Nix Node setup.

See CONTRIBUTING.md for branch, commit, PR, testing, and release-note guidance.

See the documentation for more details.

Community Credits

Special thanks to kazupon for substantial community contributions around JSDoc support, including the API docs generation pipeline and documentation quality.

If you find Ox Content useful, please consider sponsoring the project.

License

MIT License - see LICENSE

Top categories

Loading Svelte Themes