Skip to content

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:

  1. Markdown-first - Write content in Markdown, get beautiful HTML
  2. No Frontend Code - This package doesn't include React, Vue, or CSS
  3. Async by Default - Always use with await for performance
  4. 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-markdown

Getting 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.

Usage Examples

See Examples for more detailed usage examples.

API Reference

See API Documentation for complete API reference.

Released under MIT License