← 返回 Skills 市场
mebusw

Wechat Markdown Html Render

作者 Jacky Shen · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
44
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install wechat-markdown-html-render
功能描述
Render Markdown to polished HTML with WeChat-friendly typography and explicit theme layering. Use when users ask to convert Markdown articles to formatted HT...
使用说明 (SKILL.md)

Wechat Markdown Html Render

Overview

Render Markdown files into standalone HTML with separate style layers: basic-theme, text-theme, code-theme, and font-theme. Use scripts/render-markdown-html.js to generate deterministic output and keep code-block visuals independent from text theme.

Workflow

  1. Inspect site-mechanism notes in references/wechat-bmpi-analysis.md when the request mentions wechat.bmpi.dev.
  2. Install dependencies in the skill folder:
npm install
  1. Render Markdown, you can pick a text-theme and code-theme and font-theme according to article contents:
node scripts/render-markdown-html.js \
  --input /path/to/input.md \
  --output /path/to/output.html \
  --text-theme geek-black \
  --code-theme wechat \
  --font serif
  1. Validate that the output includes the four style blocks and that --text-theme and --code-theme can be changed independently.

Script Interface

  • --input: Markdown source file path (required)
  • --output: HTML output file path (required)
  • --text-theme: normal | orange-heart | geek-black | minimal-dark | gold-sea (optional, default gold-sea)
  • --code-theme: wechat | atomOneDark | atomOneLight | monokai | github | vs2015 | xcode (optional, default wechat)
  • --font: serif | sans (optional, default serif)
  • --title: Custom HTML title (optional)
  • --custom-css-file: CSS file used only when --text-theme custom (optional)

Notes

  • The script intentionally scopes markdown typography under #nice and syntax highlighting under .hljs/pre code selectors so code theme remains independent.
  • The output is standalone HTML and can be copied into downstream editors.

WeChat MP editor list normalization (built into the renderer)

The script applies two post-processing rules specifically to survive the WeChat 公众号 editor's non-standard HTML ingester. These are NOT optional — they're enabled for every render — but worth knowing when reviewing output or extending the script:

  1. Flatten \x3Cli>\x3Csection>…\x3C/section>\x3C/li> for leaf items. The MP editor drops the list marker (the 1. 2. 3. numbers, or bullets) when a \x3Cli> contains a block-level child like \x3Csection>, and also inserts an extra blank row per item from the section's vertical margins. Fix: for \x3Cli> that does NOT contain a nested \x3Cul>/\x3Col>, the renderer unwraps the inner section and merges its typographic styles directly onto the \x3Cli>. Items with nested sub-lists keep the section wrapper (their sub-list layout depends on it).

  2. Zero whitespace at \x3Col>/\x3Cul> boundaries and between sibling \x3Cli>s. The MP editor treats whitespace text nodes between \x3Cli> siblings (and at the start/end of a \x3Cul>/\x3Col>) as additional EMPTY list items, producing numbered/bulleted blank rows interleaved with the real ones. Newline-only stripping is NOT enough — spaces and tabs leak through and still trigger the bug. The renderer collapses all whitespace at those three positions: \x3Col> → first \x3Cli>, \x3C/li> → next \x3Cli>, last \x3C/li>\x3C/ol> (and the same for \x3Cul>).

Symptoms in the MP editor preview when either rule fails:

  • Rule 1 broken → no 1. 2. 3. markers, items show as plain paragraphs separated by blank rows.
  • Rule 2 broken → 1. (blank) / 2. real / 3. (blank) / 4. real / … — count of visual rows ≈ 2N + 1 for N real items.

If you copy text out of the MP editor and the markers are missing, that's a clipboard artifact (markers are CSS ::marker pseudo-elements, not text nodes) — verify in the editor's visual preview, not the copied text.

安全使用建议
Install only if you want a local Markdown-to-HTML rendering helper. Review any sample articles before reusing or publishing them, and do not put secrets or sensitive personal data into Markdown files you plan to render or share.
能力评估
Purpose & Capability
The declared purpose matches the main artifacts: SKILL.md describes Markdown rendering for WeChat-style HTML, and the script reads a user-specified Markdown file, applies styling, and writes a user-specified HTML file.
Instruction Scope
The flagged OpenClaw maintenance material is unrelated to renderer functionality, but it appears in reference/sample input and generated HTML output rather than in the skill's runtime instructions. It does not instruct the agent to perform those actions during normal use.
Install Mechanism
The skill tells users to run npm install and then execute a local Node.js renderer. No package manifest was present in the artifact list, which is a quality/usability issue, but there is no evidence of an install hook or hidden privileged installation behavior.
Credentials
The executable script uses local filesystem access proportionate to its purpose: it reads the specified input Markdown, optionally reads a custom CSS path only when requested, creates the output directory, and writes the specified HTML. I found no network calls, shell spawning, credential reads, or broad local indexing.
Persistence & Privilege
The skill does not create background workers, modify agent configuration, request elevated privileges, or persist state beyond the user-directed output file.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install wechat-markdown-html-render
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /wechat-markdown-html-render 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of the wechat-markdown-html-render skill. - Converts Markdown files to standalone HTML with distinct, independently switchable style layers: basic-theme, text-theme, code-theme, and font-theme. - Provides a CLI script supporting customizable text and code themes, font selection, and custom CSS for theme extensions. - Integrates WeChat 公众号 editor-specific HTML output fixes: list item structure normalization and whitespace collapsing to ensure correct list rendering. - Output HTML is ready for further editing or direct use, preserving theme and code block visibility regardless of WeChat quirks.
元数据
Slug wechat-markdown-html-render
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Wechat Markdown Html Render 是什么?

Render Markdown to polished HTML with WeChat-friendly typography and explicit theme layering. Use when users ask to convert Markdown articles to formatted HT... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 44 次。

如何安装 Wechat Markdown Html Render?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install wechat-markdown-html-render」即可一键安装,无需额外配置。

Wechat Markdown Html Render 是免费的吗?

是的,Wechat Markdown Html Render 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Wechat Markdown Html Render 支持哪些平台?

Wechat Markdown Html Render 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Wechat Markdown Html Render?

由 Jacky Shen(@mebusw)开发并维护,当前版本 v1.0.0。

💬 留言讨论