md-to-wechat

将 Markdown 格式的文章转换为微信公众号专用的 HTML 格式,支持多种主题配色

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "md-to-wechat" with this command: npx skills add chengzhi43/md-to-wechat/chengzhi43-md-to-wechat-md-to-wechat

Markdown 转微信公众号 HTML

将 Markdown 格式的文章转换为微信公众号专用的 HTML 格式。

When to use

  • 写完 Markdown 文章后,需要发布到微信公众号
  • 需要保留排版样式,但微信不支持 Markdown
  • 想要统一的文章风格和配色
  • 用户提到"微信"、"公众号"、"md 转 html"等关键词

Instructions

  1. 确认输入文件:首先确认 Markdown 文件路径,如果用户提供了路径则直接读取,否则询问用户或搜索当前目录下的 .md 文件

  2. 选择主题(可选):询问用户是否需要特定主题,默认使用"龙虾红"主题

    • lobster: 龙虾红(默认,适合科技、AI 类文章)
    • ocean: 海洋蓝(适合商务、专业类)
    • forest: 森林绿(适合自然、环保类)
    • sunset: 日落橙(适合活力、创意类)
    • minimal: 极简灰(适合简约、严肃类)
  3. 执行转换:调用转换脚本

    python scripts/md_to_wechat.py input.md output.html --theme lobster
    
  4. 输出文件:生成的 HTML 文件保存在与原 Markdown 相同的目录,文件名格式:原文件名_微信发布版.html

  5. 使用指导:告诉用户如何使用生成的 HTML

    • 用浏览器打开 HTML 文件
    • Ctrl+A 全选内容
    • 复制粘贴到微信公众号编辑器
    • 检查并上传图片(图片需要手动上传到微信)

支持的 Markdown 元素

元素转换效果
标题 # ## ###带左侧彩色边框的标题样式
粗体 **text**红色加粗高亮
引用 > quote灰色背景 + 左侧边框
列表 - item带缩进的列表项
代码 `code`浅灰背景 + 圆角
分割线 ---居中装饰线
链接 [text](url)蓝色可点击链接

HTML 模板规范

微信公众号 HTML 的特殊要求:

  • 必须使用内联样式:微信不支持 class 和外部 CSS
  • 支持的标签<section>, <p>, <h1>-<h6>, <strong>, <em>, <span>, <blockquote>, <ul>/<ol>/<li>, <a>, <img>
  • 不支持的标签<script>, <iframe>, <form>, 外部 <link> CSS

注意事项

  1. 图片处理:图片需要手动上传到微信服务器,HTML 中的图片链接在粘贴后会失效
  2. 链接限制:微信公众号中的外链只在"阅读原文"中有效,正文中的链接无法点击跳转
  3. 字体限制:只能使用系统自带字体,自定义字体无效
  4. 测试建议:粘贴后先预览,检查手机端显示效果

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

md-to-wechat

No summary provided by upstream source.

Repository SourceNeeds Review
General

test_skill

import json import tkinter as tk from tkinter import messagebox, simpledialog

Archived SourceRecently Updated
General

错敏信息检测

1. 安装https://clawhub.ai/xxxx/sensitive-check-skill 这个技能 2. 调用错敏信息检测技能,传入参数 userKey=xxxx,content=xxxx

Archived SourceRecently Updated
General

neo

Browse websites, read web pages, interact with web apps, call website APIs, and automate web tasks. Use Neo when: user asks to check a website, read a web page, post on social media (Twitter/X), interact with any web app, look up information on a specific site, scrape data from websites, automate browser tasks, or when you need to call any website's API. Keywords: website, web page, browse, URL, http, API, twitter, tweet, post, scrape, web app, open site, check site, read page, social media, online service.

Archived SourceRecently Updated