# shuya-markdown **Repository Path**: yacuo/shuya-markdown ## Basic Information - **Project Name**: shuya-markdown - **Description**: 在线 Markdown 公众号格式化排版编辑器,支持 Markdown 美化、公众号图文排版、md 格式化、免费开源在线排版,写完一键复制到公众号后台 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: https://shuya.yacuo.com/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-11-04 - **Last Updated**: 2026-11-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 书芽 / ShuYa > 少折腾格式,多专注内容。 书芽是一个免费开源的在线 Markdown 编辑器,专注把 Markdown 原稿整理成适合微信公众号、知乎发布的图文。写作者、新媒体编辑和开发者可以在同一个浏览器工作台里完成写作、排版、图片处理、手机预览和复制导出,不需要在多个工具之间来回粘贴改格式。 书芽还内置了微信官方的文章结构校验引擎:复制到公众号之前先按官方规则检查排版,把可能被公众号提示「内容结构检测异常」的问题提前找出来。 - 官网:https://shuya.yacuo.com - 编辑器:https://shuya.yacuo.com/editor - 教程:https://shuya.yacuo.com/docs - 短入口:https://md.yacuo.com - 仓库:https://github.com/yacuo/shuya-markdown - 许可证:MIT ## 名字由来 **书芽**,意为“书写之芽”,希望让每一个想法都能更轻松地长成一篇文章。 ## 功能 ### Markdown 写作 支持标题、列表、引用、代码块、表格、脚注、提示框、目录等常用语法,以及 `:::tip` 容器和 `> [!NOTE]` 这类 GitHub 风格提示。工具栏提供 22 项插入操作,块级内容插入时自动补齐空行;工具栏左侧还有撤销 / 重做和查找替换(⌘Z、⇧⌘Z、⌘F)。另有可视化表格插入、表格全局与单列对齐、正则查找与批量替换、文档大纲。 ### 文章排版 - **20 套文章主题**:覆盖绿色、蓝青、暖色、粉紫和中性等色调,切换后预览立即更新,只改样式不改写 Markdown 源文。 - **3 种正文风格**:无衬线、衬线、等宽。 - **4 档正文字号**(14–17px)与 **4 档代码字号**(12–15px)。 - **8 种公众号字体**,其中部分字体仅在 iOS 生效。 - **6 套代码主题**与 Mac 风格代码块。 - **5 种图注规则**,按 title / alt 决定图片说明的显示方式。 ### 图片与图床 图片可以通过选择、拖拽、粘贴、远程 URL 四种方式加入文章。支持 GitHub、阿里云 OSS、腾讯云 COS、七牛云 Kodo 四类图床,配置默认图床后,本地图片、粘贴截图、远程图片都会走同一套上传入口,也支持把稿件中的外链图片批量转存。 ### 预览 桌面端双栏编辑预览,编辑区与预览区同步滚动;提供 4 种手机机型预览,发布前可以检查标题换行、图片宽度、代码块、表格和段落密度。支持编辑器全屏、预览全屏、只编辑、只预览等布局。 ### 复制与导出 - 复制到微信公众号、知乎,或取得 HTML 内容,尽量保留标题、段落、图片、表格和代码块样式。 - 导入、导出 Markdown,导出 HTML。 - 导出 PNG 长图,导出分页 PDF,复制文章图片到剪贴板。 ### 复制前排版自检 书芽内置微信官方的文章结构校验引擎(源码在 `vendor/verify-article-structure/`,MIT),复制到公众号前会自动在浏览器里跑一遍检查:行高叠字、宽度溢出、嵌套层级、透明度、暗色模式等。发现异常就暂停复制,列出规则说明和对应段落,可以先返回修改,也可以确认后仍然复制。校验不会上传文章。 ### 本地草稿与设置 编辑内容约 2 秒自动保存到当前浏览器本地,刷新后可继续写。主题、字体、字号、代码主题、图注规则和图床配置同样会记住,且可以按项恢复默认,恢复设置不会清空草稿。 ## 隐私 书芽不存储用户文章、草稿、图床密钥或上传文件。文章编辑和草稿保存发生在浏览器本地;图床 Token、AccessKey、SecretKey 等配置也保存在浏览器本地。上传图片时,由你的浏览器直连你自己的图床账号。 ## 项目结构 ```text apps/editor 在线编辑器:编辑器页面、组件、渲染模块、样式与静态资源 apps/website 产品官网与使用教程 docs 架构说明与项目文档 vendor 引入的上游代码与来源说明 ``` 两个应用都是 Next.js 静态导出,可以一起使用,也可以只用其中一个。 ## 本地运行 ```bash npm install npm run dev # 编辑器 http://localhost:3780 npm run dev:website # 官网与教程 http://localhost:3781 npm run build # 构建 npm run lint # 代码检查 ``` `./shell/restart-dev.sh` 可以一次启动两个应用。 ## 参与贡献 欢迎提 Issue 和 Pull Request。提交前请先读 [CONTRIBUTING.md](./CONTRIBUTING.md);安全问题请按 [SECURITY.md](./SECURITY.md) 的方式反馈。 ## 使用提醒 - 书芽不是公众号一键发布工具,只负责整理排版和复制内容,发布仍在公众号后台完成。 - 图床密钥请只在本地配置,不要提交到仓库。 - 公众号字体仅对 iOS 设备生效,预览和发布时需要留意设备差异。 ## License MIT License,详见 [LICENSE](./LICENSE)。 使用、修改或分发本项目时,请保留原始版权声明和许可证文本,并注明项目来源: ```text https://github.com/yacuo/shuya-markdown ``` --- ## English ShuYa is a free, open-source online Markdown editor for WeChat Official Account and Zhihu. It brings writing, styling, image handling, mobile preview, and copy/export into one browser workspace. ShuYa also bundles WeChat's official article structure check engine. Before you copy to WeChat, it validates the layout against the official rules and surfaces issues that could trigger "content structure" warnings. - Website: https://shuya.yacuo.com - Editor: https://shuya.yacuo.com/editor - Docs: https://shuya.yacuo.com/docs - Repository: https://github.com/yacuo/shuya-markdown ### Features - **Writing**: headings, lists, quotes, code blocks, tables, footnotes, callouts, and a table of contents; a 22-action toolbar plus undo/redo (⌘Z, ⇧⌘Z) and find & replace (⌘F); document outline. - **Styling**: 20 article themes, 3 body font styles, 4 font sizes, 8 WeChat fonts (some iOS-only), 6 code themes, macOS-style code blocks, and 5 caption rules. - **Images**: add images by file picker, drag-and-drop, paste, or remote URL; upload to GitHub, Aliyun OSS, Tencent COS, or Qiniu Kodo; batch-migrate external images. - **Preview**: synchronized editor and preview panes, 4 phone models, and multiple layout modes. - **Copy and export**: copy to WeChat or Zhihu, copy HTML, import/export Markdown, export HTML, PNG long image, and paginated PDF. Copying to WeChat first runs the official WeChat article structure check (line height, width overflow, nesting, opacity, dark mode) and lists problematic blocks so you can fix them or copy anyway. - **Local drafts**: drafts autosave in the browser about every 2 seconds; settings persist and can be reset individually. ShuYa stores no articles, drafts, image-host credentials, or uploaded files. Everything stays in your browser, and images are uploaded directly from your browser to your own image host. ### Development ```bash npm install npm run dev # editor at http://localhost:3780 npm run dev:website # website and docs at http://localhost:3781 ``` ### License MIT License. See [LICENSE](./LICENSE). Please keep the copyright notice and license text, and credit the project: ```text https://github.com/yacuo/shuya-markdown ```