Tool v1.0.0

markdown-to-html

将 Markdown 文本转换为样式精美、自包含的 HTML,内嵌 CSS,适用于新闻通讯、文档、报告和邮件模板

ClawHub 更新于 2026-03-23 25 浏览
下载 SKILL

技能说明

将 Markdown 文本转换为样式精美、自包含的 HTML,内嵌 CSS,适用于新闻通讯、文档、报告和邮件模板

使用场景

Converts Markdown to styled HTML with embedded CSS for newsletters, docs, reports, and email templates

查看英文原始说明

Convert Markdown text to beautifully styled, self-contained HTML with embedded CSS. Perfect for newsletters, documentation, reports, and email templates.

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

帮我下载并安装这个SKILL:https://skillhub.cstcloud.cn/download/markdown-to-html
  1. 点击上方「下载 SKILL」按钮,获取技能压缩包。
  2. 将压缩包解压到你的 Agent 技能目录。
  3. 重启客户端后即可在技能列表中选择该技能。

技能文件内容

4 个文件 · 15 kB · zip 7.3 kB
手动下载 zip · 7.3 kB
SKILL.md text/markdown
---
name: markdown-to-html
description: Convert Markdown text to beautifully styled, self-contained HTML with embedded CSS. Perfect for newsletters, documentation, reports, and email templates.
triggers:
  - convert markdown to html
  - markdown to html
  - render markdown
  - style markdown
---

# Markdown to HTML Converter

A zero-dependency Python tool that converts Markdown files into beautiful, self-contained HTML documents with embedded CSS styling. No external libraries needed — uses only Python's standard library.

## Features

- **Full Markdown support**: Headings, bold, italic, strikethrough, links, images, code blocks with syntax hints, blockquotes, ordered and unordered lists, horizontal rules, and tables
- **Two built-in themes**: Light (GitHub-inspired) and Dark mode with carefully chosen colors
- **Self-contained output**: All CSS is embedded inline — the resulting HTML file works anywhere with no external dependencies
- **Responsive design**: Output looks great on desktop and mobile screens
- **Stdin support**: Pipe content directly for use in shell pipelines

## Usage Examples

Convert a file with the default light theme:
```bash
python main.py README.md -o readme.html
```

Use the dark theme for a presentation:
```bash
python main.py notes.md -o notes.html --theme dark --title "Meeting Notes"
```

Pipe from another command:
```bash
cat CHANGELOG.md | python main.py - -o changelog.html
```

Use in a newsletter pipeline:
```bash
python main.py issue-42.md --title "Lobster Diary #42" -o issue.html
```

## Supported Markdown Elements

| Element | Syntax | Supported |
|---------|--------|-----------|
| Headings | `# H1` through `###### H6` | ✅ |
| Bold | `**text**` | ✅ |
| Italic | `*text*` | ✅ |
| Strikethrough | `~~text~~` | ✅ |
| Links | `[text](url)` | ✅ |
| Images | `![alt](url)` | ✅ |
| Code blocks | Triple backtick with language | ✅ |
| Inline code | Single backtick | ✅ |
| Blockquotes | `> text` | ✅ |
| Unordered lists | `- item` or `* item` | ✅ |
| Ordered lists | `1. item` | ✅ |
| Horizontal rules | `---` | ✅ |

## Command Line Options

- `input` — Markdown file path, or `-` for stdin
- `-o, --output` — Output HTML file (defaults to stdout)
- `--theme` — `light` (default) or `dark`
- `--title` — HTML document title (default: "Document")

文件内容直接读取自技能仓库,仅供安装前审阅;以实际下载的压缩包为准。