This is a Skill that converts standard Markdown text into HTML files that can be directly copied and pasted into the WeChat Official Account article editor. WeChat Official Account requires all styles in HTML to be inline (Inline CSS).
The core advantage of this Skill is
zero deployment. As long as Node.js is installed in the user's environment, the conversion task can be completed extremely lightly by executing the built-in conversion script of this Skill. It will automatically load the required dependencies in a temporary directory and clean up after completion, leaving no environment garbage, and no need for users to run
in advance.
When you receive a conversion request from a user, if no theme is specified,
resources/themes/default.css
will be used by default.
Please
directly execute the following command on behalf of the user to call the built-in
of this Skill. If you are using tools (such as Terminal / run_command), just call it directly.
Execute the conversion with
:
The script will automatically and safely handle Markdown conversion, add the WeChat container
, and inline-inject the specified CSS theme.
Note: The current theme system carries CSS variables (such as
) in the root node of the container to share color semantics across multiple themes. If you need to upload to the draft box via
later, please use its latest publishing script, which will automatically expand
before uploading to prevent color styles from being lost in the WeChat backend.
After completion, directly inform the user: "Your Official Account HTML has been generated in
. You can open it directly in a browser to preview the effect, or open it with an editor/browser, select all and copy, then paste it into the WeChat Official Account backend."
Multiple sets of different CSS theme schemes can be stored in the
directory under this Skill.
If the user requests to change the theme style, you can view and read the paths of existing CSS files in this directory and pass them to the script, which makes this Skill naturally support the "skin change" feature.