BioX-markdown Package Documentation
Complete documentation for the BioX-markdown package.
What is BioX-markdown?
BioX-markdown is a Markdown-to-HTML rendering library designed for server-side and build-time rendering. It extends standard Markdown with advanced features including:
- ✅ LaTeX Support - KaTeX for PhD-level mathematical equations
- ✅ Video URLs - Auto-convert to expandable details
- ✅ Syntax Highlighting - Prism.js for 100+ languages
- ✅ Smart Links - Automatic internal/external classification
- ✅ Heading Anchors - GitHub-style anchor links
- ✅ Custom Styling - BioX-branded output
Designed for Server-Side
BioX-markdown is not designed for client-side rendering. The bundle size is significant and hasn't been optimized for browser performance. Instead, it's perfect for:
- Static Site Generation - Render Markdown at build time
- Server-Side Rendering - Generate HTML on server
- API Endpoints - Convert Markdown to HTML via API
- CLI Tools - Process Markdown files in build pipelines
Philosophy
BioX-markdown follows these principles:
- Markdown-first - Write content in Markdown, get beautiful HTML
- No Frontend Code - This package doesn't include React, Vue, or CSS
- Async by Default - Always use with
awaitfor performance - Extensible - Easy to add custom plugins and handlers
Installation
See Installation Guide for detailed instructions.
bash
npm install BioX-markdown
# or
yarn add BioX-markdown
# or
pnpm add BioX-markdownGetting Started
javascript
import markdownToHtml from 'BioX-markdown'
const markdown = `# Hello World
\`\`\`js
console.log('Hello from BioX!')
\`\`\`
`
const html = await markdownToHtml(markdown)
console.log(html)Features Overview
See Features for complete feature documentation.
- LaTeX Support - PhD-level mathematical equations
- Syntax Highlighting - Code highlighting for 100+ languages
- Video URLs - Auto-convert video links
- Link Classification - Internal vs external links
- Heading Anchors - GitHub-style anchors
- sh → shell - Automatic shell conversion
Usage Examples
See Examples for more detailed usage examples.
API Reference
See API Documentation for complete API reference.
External Links
- GitHub Repository - Source code
- npm Package - Package page
- KaTeX Documentation - LaTeX API reference