
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@weave-md/basic
Advanced tools
Reference implementation of Weave Markdown - CLI, renderer, and exporter
CLI and exporter for Weave Markdown.
pnpm add @weave-md/basic
weave-md-basic export html --entry=intro # Export to HTML
weave-md-basic export ast # Export to JSON AST
HTML entry point: If exactly one .md file exists in the root directory, --entry is auto-detected:
weave-md-basic export html
Output: Use --out to specify output directory:
weave-md-basic export html --out=./build
weave-md-basic validate # Check for errors
weave-md-basic validate --strict # Exit 1 on errors
weave-md-basic validate --json # JSON output
weave-md-basic help
import { loadWorkspace, exportToStaticHtml, parseToMdast } from '@weave-md/basic';
// Load sections from directory
const { sections, rawContent } = await loadWorkspace('./content');
// Parse to mdast trees
const trees = new Map();
for (const section of sections) {
const content = rawContent.get(section.id);
if (content) {
const { tree } = parseToMdast(content);
trees.set(section.id, tree);
}
}
// Export to static HTML
const html = exportToStaticHtml(sections, trees, { title: 'My Document' });
loadWorkspace(path, options?)Load sections from .md files with valid frontmatter. Recursively scans directories and subfolders.
options.files - Load specific files onlyoptions.extensions - File extensions (default: ['.md'])options.exclude - Directories to skip (default: ['node_modules', '.git'])Returns { sections, filePaths, rawContent }.
exportToStaticHtml(sections, trees, options?)Generate a complete HTML document with footnotes and overlay support.
options.title - Document titleoptions.entry - Entry section ID (only renders this section and its references)This renderer enforces the following nesting restrictions:
| Context | Allowed Node Links |
|---|---|
| Main content | footnote, inline, overlay |
| Inside footnote | overlay only |
| Inside inline | overlay only |
| Inside overlay | none (plain text) |
Node links inside footnotes and inline content are converted to overlays. Overlays cannot contain further interactive links.
MIT
FAQs
Reference implementation of Weave Markdown - CLI, renderer, and exporter
The npm package @weave-md/basic receives a total of 19 weekly downloads. As such, @weave-md/basic popularity was classified as not popular.
We found that @weave-md/basic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.