Skip to content

🌈 A powerful md2html (Markdown to HTML) converter service, support GFM.

License

Notifications You must be signed in to change notification settings

vikiboss/md2html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

20 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

md2html (Markdown (GFM) to HTML API)

Note

This project is under active development. Feel free to open an issue for bugs or feature requests.

A powerful md2html (Markdown to HTML) converter service that transforms your Markdown content (GFM) into beautiful, feature-rich HTML. Built with modern technologies and support for advanced syntax features.

πŸš€ Quick Start

Installation

# Using npm
npm install

# Start development server
npm run dev

Basic Usage

// Client-side usage
const response = await fetch('https://localhost:3000', {
  method: 'POST',
  headers: {
    'Content-Type': 'text/markdown'
  },
  body: '## Hello, World!'
});

const html = await response.text();

✨ Features

Core Markdown Support

  • Complete GitHub Flavored Markdown (GFM)
    • Emoji Shortcodes: :smile: β†’ πŸ˜„
    • Smart Autolinks: URLs automatically convert to clickable links
    • Syntax-highlighted Code Blocks
    • Tables with alignment options
    • Task Lists: - [x] (checked) and - [ ] (unchecked)
    • Strikethrough: ~~text~~
    • Extended Table Features

Enhanced Formatting

GitHub-Style Alerts

Note

This is a note

Tip

This is a helpful tip

Important

Critical information

Warning

Warning message

Caution

Proceed with caution

> [!NOTE]
> This is a note

> [!TIP]
> This is a helpful tip

> [!IMPORTANT]
> Critical information

> [!WARNING]
> Warning message

> [!CAUTION]
> Proceed with caution

Mathematical Expressions (KaTeX)

  • Display Math: $$ ... $$ or \[ ... \]
  • Inline Math: $ ... $
  • Supports complex mathematical notations and equations
  • Fast rendering with KaTeX

Advanced Code Blocks

Powered by Shiki, featuring:

  • Rich syntax highlighting for 100+ languages
  • Multiple beautiful themes
  • Special annotations:
function hello() {
  console.log('Hello World!'); // [!code focus]
}

Advanced notation support:

  • Diff highlighting: + for additions, - for deletions
  • Line focusing: // [!code focus]
  • Line highlighting: {1,3-5}
  • Word highlighting: /pattern/
  • Error/Warning levels: [!code error], [!code warning]

Additional Features

  • Heading Anchors: Automatically generated, hoverable link icons
  • Footnotes: Support for reference-style footnotes
  • Table of Contents: Auto-generated based on headings
  • Responsive Design: Looks great on all devices
  • Custom Containers: For special content blocks
  • Image Optimization: Lazy loading and size optimization

πŸ“„ License

MIT License Β© 2025-PRESENT Viki

About

🌈 A powerful md2html (Markdown to HTML) converter service, support GFM.

Topics

Resources

License

Stars

Watchers

Forks