前端开发

baoyu-markdown-to-html

jimliu/baoyu-skills

Converts Markdown to styled HTML with WeChat-compatible themes. Supports code highlighting, math, Mermaid (rendered to PNG via headless Chrome), PlantUML, footnotes, alerts, infographics, and optional bottom citations for external links. Use when user asks for "markdown to html", "convert md to html", "md 转 html", "微信外链转底部引用", or needs styled HTML output from markdown.

  • 3.2万 次安装
  • 2.7万 星标
  • 收录于

安装命令

npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-markdown-to-html

要点

Converts Markdown to styled HTML with WeChat-optimized themes, code highlighting, and optional bottom citations.

  • Supports four themes (default, grace, simple, modern) with customizable colors, fonts, and sizes via CLI options
  • Handles advanced Markdown features including syntax-highlighted code blocks, tables, Mermaid/PlantUML diagrams, alerts, footnotes, and ruby text
  • Optional citation mode converts external links to numbered references with a bottom "引用链接" section, preserving WeChat links inline
  • Detects Chinese content and offers automatic formatting via the baoyu-format-markdown skill to fix spacing and punctuation issues
  • Reads theme defaults from EXTEND.md (project, user, or XDG config locations) to avoid repeated prompts

SKILL.md

Markdown to HTML Converter

Converts Markdown files to beautifully styled HTML with inline CSS, optimized for WeChat Official Account and other platforms.

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
  3. Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.

Script Directory

Agent Execution: Determine this SKILL.md directory as {baseDir}. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.