@vx-oss/docs-local-html
v1.0.7
Published
The local HTML files content source for Fumadocs
Readme
Fumadocs Local HTML
The local HTML files content source for Fumadocs. It integrates plain .html files — exported decks, reports, agent-generated deliverables, pages from other tools — into a Fumadocs site, adapting them to the docs theme:
- content is scoped to the page's
<main>/<article>(page chrome, scripts and styles are dropped), class/styleattributes are removed by default so the docs prose styling takes over,- headings get generated ids, powering the table of contents and search indexing,
<pre><code>blocks are highlighted with Shiki, from thelanguage-*class they carry,<title>and<meta>tags become the page's title/description (fumadocs:title,fumadocs:descriptionandfumadocs:iconmetas take precedence).
Trust model: content is transformed, not sanitized. Nothing that executes survives (e.g. <script>, <style>, <iframe>, <object>, <embed>, <form>), inline event handlers and javascript: URLs are always dropped, but the remaining markup is rendered as-is, and remote resources it references (images above all) are fetched by everyone who opens the page.
import { localHtml } from '@vx-oss/docs-local-html';
const source = localHtml({ dir: 'content/pages' });See the documentation for details.
