30 releases (11 breaking)
| new 0.14.0 | Mar 1, 2026 |
|---|---|
| 0.12.0 | Feb 23, 2026 |
#727 in FFI
130KB
2.5K
SLoC
Ox Content
Framework-agnostic documentation tooling
High-performance Markdown parser built in Rust
Documentation • Getting Started • Playground
Features
- Blazing Fast - Arena-allocated parser with zero-copy parsing
- mdast Compatible - Full compatibility with the unified ecosystem
- 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
- API Docs Generation - Generate docs from JSDoc/TypeScript (like
cargo doc) - i18n - ICU MessageFormat 2 parser, dictionary management, static checker, and LSP
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/napi
// 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',
},
}),
],
});
Framework Integration
# Vue
npm install @ox-content/vite-plugin-vue @ox-content/napi
# React
npm install @ox-content/vite-plugin-react @ox-content/napi
# Svelte
npm install @ox-content/vite-plugin-svelte @ox-content/napi
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}"
Development
pnpm install # Install dependencies
mise run napi-build # Build NAPI bindings
mise run npm-build # Build npm packages
mise run test # Run tests
See the documentation for more details.
Sponsor
If you find Ox Content useful, please consider sponsoring the project.
License
MIT License - see LICENSE
lib.rs:
Vite Environment API integration for Ox Content.
This crate provides integration with Vite's Environment API for building documentation sites with Astro-like SSG rendering.
Dependencies
~0.7–1.7MB
~33K SLoC