npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@klaybloom/mdpress-publisher

v0.1.0

Published

Codex Skill 安装器:将 Markdown 生成微信公众号内联 HTML 和小红书图片。

Downloads

14

Readme

mdpress · Markdown 多端排版工具

mdpress 支持两种使用方式:

  1. 网页版编辑器:在浏览器里编辑 Markdown、预览排版、复制公众号 HTML 或导出小红书图片。
  2. 本地 Codex Skill:对已有 Markdown 文件直接生成公众号内联 HTML 和小红书 1080×1440 图片,不改写原文。

网页版功能

  • Markdown 原生预览、微信公众号排版、小红书卡片三种模式
  • 公众号模板:classicprogramband
  • 小红书模板:simpleborderhandwrite
  • 支持标题、列表、引用、表格、脚注、任务列表、代码块和图片
  • 公众号内容可复制为内联样式 HTML;小红书长文自动拆成连续卡片
  • 支持深浅色界面、字号、配色、字体和行距设置

网页版运行

npm install
npm run dev

打开终端显示的本地地址即可使用。测试命令:

npm test

安装为 Codex Skill

无需克隆仓库,运行:

npx @klaybloom/mdpress-publisher

它会将 mdpress-publisher 安装到 ~/.codex/skills/mdpress-publisher/。需要更新或覆盖现有安装时:

npx @klaybloom/mdpress-publisher --force

之后在 Codex 中可以直接提出“使用 mdpress-publisher 生成这个 Markdown 的公众号 HTML 和小红书图片”。Skill 不改写、上传或发布内容。

命令行使用(无需安装)

只生成微信公众号 HTML:

npx @klaybloom/mdpress-publisher publish /absolute/path/article.md \
  --targets wechat \
  --out /absolute/path/output

同时生成微信公众号 HTML 和小红书图片:

npx @klaybloom/mdpress-publisher publish /absolute/path/article.md \
  --out /absolute/path/output \
  --wechat-template classic \
  --xhs-template border \
  --xhs-color red \
  --xhs-font hand \
  --xhs-font-size 16 \
  --asset-base-url https://cdn.example.com/assets/

默认输出到 Markdown 同目录的 mdpress-output/<文件名>/

  • wechat.html:可粘贴到公众号编辑器的内联样式 HTML
  • xhs/001.pngxhs/002.png…:1080×1440 小红书图片
  • manifest.json:生成参数与文件清单

常用参数:

--targets wechat,xhs       仅生成指定目标,默认两个都生成
--force                    覆盖已有输出目录
--wechat-template          classic | program | band
--xhs-template             simple | border | handwrite
--xhs-color                blue | orange | teal | red | green | purple
--xhs-font                 hand | sans | serif | round
--xhs-font-size            13 到 22

公众号 Markdown 含本地图片时,必须提供 --asset-base-url,让相对路径映射为可访问的 HTTPS 地址。小红书图片可直接读取 Markdown 同目录的本地图片。首次生成小红书图片前,需要安装 Playwright Chromium:

npx playwright install chromium

表格、代码块或单张图片高于一张卡片的可用高度时,命令会停止并说明原因,不会输出被裁切的图片。

从仓库安装

克隆仓库后,也可在项目目录运行:

node scripts/install-mdpress-skill.mjs

若要覆盖已有同名 skill:

node scripts/install-mdpress-skill.mjs --force

项目结构

src/                         网页编辑器与共享排版模块
scripts/mdpress-publish.mjs  本地 Markdown 发布命令
scripts/install-mdpress-skill.mjs
skills/mdpress-publisher/    可安装的 Codex skill 模板
test/                        单元与命令行集成测试

技术栈

Vue 3、Vite、markdown-it、highlight.js、Playwright、html2canvas。

License

MIT