Skip to content

ZJU-REAL/Easel / skills/builtin/gzh-design

gzh-design

Verified

微信公众号文章排版引擎:把 Markdown / Word(.docx) / PDF / 纯文本转成可直接粘贴进公众号编辑器的 HTML,自动章节编号、关键词标记、引言卡、目录、代码块、图片/GIF、作者签名;主题从 references/theme-index.md 组件库按题材推荐,支持"一键自动排版"与按描述/参考图生成自定义主题。触发:用户提到"公众号排版/微信排版/gzh"、想把文章(md/docx/pdf/纯文本)转成公众号 HTML、说"自动排版/一键排版"公众号内容。不用于普通网页/落地页/PPT。

FileKindSize
CONTRIBUTING.mdmarkdown2.0 KB
EASEL-META.mdmarkdown1.1 KB
LICENSEother34.2 KB
README.en.mdmarkdown15.6 KB
README.mdmarkdown19.8 KB
SKILL.mdskill md17.8 KB
archive/gallery-v1/cardnote.htmlother18.7 KB
archive/gallery-v1/cream.htmlother18.2 KB
archive/gallery-v1/datainfo.htmlother29.8 KB
archive/gallery-v1/dianlan.htmlother17.7 KB
archive/gallery-v1/graphite.htmlother19.7 KB
archive/gallery-v1/heibaihui.htmlother17.6 KB
archive/gallery-v1/heikeji.htmlother23.0 KB
archive/gallery-v1/hongbai.htmlother17.2 KB
archive/gallery-v1/hupo.htmlother17.1 KB
archive/gallery-v1/jiaotang.htmlother17.6 KB
archive/gallery-v1/lvkeji.htmlother21.0 KB
archive/gallery-v1/magfeature.htmlother22.5 KB
archive/gallery-v1/meigui.htmlother17.2 KB
archive/gallery-v1/mistblue.htmlother20.4 KB
archive/gallery-v1/qingshiban.htmlother17.0 KB
archive/gallery-v1/rich_hongbai.htmlother14.5 KB
archive/gallery-v1/rich_morandi.htmlother15.2 KB
archive/gallery-v1/rich_terminal.htmlother17.5 KB
archive/gallery-v1/rich_zen.htmlother13.3 KB
archive/gallery-v1/tianlan.htmlother16.3 KB
archive/gallery-v1/zise.htmlother17.7 KB
archive/themes-v1/theme-amber-orange.mdmarkdown22.0 KB
archive/themes-v1/theme-caramel-brown.mdmarkdown23.1 KB
archive/themes-v1/theme-card-notes.mdmarkdown33.9 KB
archive/themes-v1/theme-cream-warmth.mdmarkdown22.1 KB
archive/themes-v1/theme-data-infographic.mdmarkdown34.9 KB
archive/themes-v1/theme-editorial-feature.mdmarkdown25.7 KB
archive/themes-v1/theme-elegant-purple.mdmarkdown20.9 KB
archive/themes-v1/theme-emerald-tech.mdmarkdown23.7 KB
archive/themes-v1/theme-indigo-business.mdmarkdown20.9 KB
archive/themes-v1/theme-mist-blue.mdmarkdown25.5 KB
archive/themes-v1/theme-mono-black.mdmarkdown19.7 KB
archive/themes-v1/theme-morandi.mdmarkdown25.0 KB
archive/themes-v1/theme-rose-pink.mdmarkdown23.4 KB
archive/themes-v1/theme-sky-blue.mdmarkdown14.0 KB
archive/themes-v1/theme-slate-minimal.mdmarkdown22.2 KB
archive/themes-v1/theme-terminal.mdmarkdown27.6 KB
archive/themes-v1/theme-terracotta-tech.mdmarkdown21.2 KB
assets/preview-template.htmlother4.0 KB
assets/sample-article.mdmarkdown2.7 KB
assets/theme-previews/theme-mono-blue-editorial.htmlother45.0 KB
docs/all-themes.mdmarkdown1.9 KB
docs/gallery/graphite-minimal.htmlother18.4 KB
docs/gallery/index.htmlother2.9 KB
docs/gallery/moyu-green.htmlother24.8 KB
docs/gallery/moyu-ticket.htmlother22.4 KB
docs/gallery/olive-journal.htmlother26.3 KB
docs/gallery/red-white.htmlother18.7 KB
docs/gallery/sample-article.mdmarkdown2.7 KB
docs/gallery/zen-whitespace.htmlother16.9 KB
references/common-components.mdmarkdown11.3 KB
references/eval-cases.mdmarkdown5.6 KB
references/format-normalize.mdmarkdown4.4 KB
references/theme-generator.mdmarkdown25.3 KB
references/theme-graphite-minimal.mdmarkdown32.7 KB
references/theme-index.mdmarkdown3.1 KB
references/theme-moyu-green.mdmarkdown43.1 KB
references/theme-moyu-ticket.mdmarkdown23.5 KB
references/theme-olive-journal.mdmarkdown55.4 KB
references/theme-red-white.mdmarkdown28.4 KB
references/theme-zen-whitespace.mdmarkdown23.3 KB
scripts/component_lint.pyexecutablescript3.8 KB
scripts/extract_docx.pyscript6.2 KB
scripts/validate_gzh_html.pyexecutablescript7.0 KB
scripts/wrap_preview.pyexecutablescript3.4 KB

archive/gallery-v1/rich_morandi.html

View on GitHub
<section style="max-width:677px;margin:0 auto;background:#F5F1F0;font-family:-apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;color:#6B6B6B;line-height:1.8;letter-spacing:0.5px;overflow-x:hidden;">

  <!-- 1. 开头引言卡片(灰玫浅底 + 左灰玫竖条)组件 2 -->
  <section style="margin:10px 10px 32px;background:#F2ECEC;border-radius:14px;box-shadow:0 2px 16px -4px rgba(181,130,140,0.12);padding:28px 24px 22px;overflow:hidden;border-left:4px solid #B5828C;">
    <p style="font-size:38px;color:#B5828C;font-weight:900;margin:0;line-height:0.7;opacity:0.6;">
      <span leaf="">"</span>
    </p>
    <p style="font-size:16px;font-weight:700;color:#4A4A4A;margin:14px 0 10px;line-height:1.8;padding-left:2px;">
      <span leaf="">排版不该是写完文章后</span>
      <span style="background:#B5828C;color:#FFFFFF;padding:2px 8px;border-radius:4px;font-weight:700;"><span leaf="">最痛苦的一步</span></span>
      <span leaf="">,当它变成</span>
      <span style="background:#B5828C;color:#FFFFFF;padding:2px 8px;border-radius:4px;font-weight:700;"><span leaf="">可复用的能力</span></span>
      <span leaf="">,每次发布都在省时间。</span>
    </p>
    <p style="text-align:right;font-size:12px;color:#A8A8A8;margin:10px 0 0;letter-spacing:1px;">
      <span leaf="">—— 林深</span>
    </p>
  </section>

  <!-- 2. 前言正文 -->
  <section style="padding:0 10px 20px;">
    <p style="margin-bottom:20px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">最近我把公众号排版做成了</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">流水线</span></span>
      <span leaf="">。先看一段核心代码:</span>
    </p>

    <!-- 代码块:组件 1a 深色代码块 -->
    <section style="margin:0 0 24px;border-radius:10px;overflow:hidden;background:#1E293B;box-shadow:0 6px 20px -8px rgba(15,23,42,0.45);">
      <section style="display:flex;align-items:center;padding:10px 16px;background:#0F172A;">
        <span style="display:inline-block;width:11px;height:11px;border-radius:50%;background:#FF5F56;margin-right:7px;font-size:0;line-height:0;overflow:hidden;">.</span>
        <span style="display:inline-block;width:11px;height:11px;border-radius:50%;background:#FFBD2E;margin-right:7px;font-size:0;line-height:0;overflow:hidden;">.</span>
        <span style="display:inline-block;width:11px;height:11px;border-radius:50%;background:#27C93F;font-size:0;line-height:0;overflow:hidden;">.</span>
        <span style="margin-left:12px;font-size:12px;color:#64748B;font-family:'SF Mono','Roboto Mono',Consolas,Monaco,monospace;letter-spacing:1px;"><span leaf="">python</span></span>
      </section>
      <section style="padding:16px 18px;overflow-x:auto;">
        <p style="margin:0;font-family:'SF Mono','Roboto Mono',Consolas,Monaco,'Courier New',monospace;font-size:13px;line-height:1.8;color:#E2E8F0;white-space:pre;">
          <span leaf="">def render(article, theme="红白色系"):</span><br>
          <span leaf="">    html = build(article, theme)</span><br>
          <span leaf="">    return validate(html)  # 必须过校验</span>
        </p>
      </section>
    </section>
  </section>

  <!-- 3. 目录导航(三栏莫兰迪色区分)组件 3 -->
  <section style="padding:0 10px 32px;">
    <p style="font-size:13px;color:#A8A8A8;margin:0 0 14px;letter-spacing:1px;">
      <span leaf="">本文看点</span>
    </p>
    <section style="display:flex;justify-content:space-between;">
      <section style="flex:1;background:#F2ECEC;border-radius:12px;padding:16px 12px;margin-right:8px;text-align:center;border:1px solid #E3DBD9;">
        <p style="display:inline-block;background:#B5828C;color:#FFFFFF;font-size:12px;font-weight:700;padding:2px 10px;border-radius:20px;margin:0 0 8px;"><span leaf="">01</span></p>
        <p style="font-size:13px;font-weight:600;color:#4A4A4A;margin:0;line-height:1.5;"><span leaf="">为什么要做这件事</span></p>
      </section>
      <section style="flex:1;background:#EEF3F6;border-radius:12px;padding:16px 12px;margin-right:8px;text-align:center;border:1px solid #E3DBD9;">
        <p style="display:inline-block;background:#8BA3B0;color:#FFFFFF;font-size:12px;font-weight:700;padding:2px 10px;border-radius:20px;margin:0 0 8px;"><span leaf="">02</span></p>
        <p style="font-size:13px;font-weight:600;color:#4A4A4A;margin:0;line-height:1.5;"><span leaf="">核心方法</span></p>
      </section>
      <section style="flex:1;background:#EFF4EF;border-radius:12px;padding:16px 12px;text-align:center;border:1px solid #E3DBD9;">
        <p style="display:inline-block;background:#9CAF9C;color:#FFFFFF;font-size:12px;font-weight:700;padding:2px 10px;border-radius:20px;margin:0 0 8px;"><span leaf="">03</span></p>
        <p style="font-size:13px;font-weight:600;color:#4A4A4A;margin:0;line-height:1.5;"><span leaf="">写在最后</span></p>
      </section>
    </section>
  </section>

  <!-- 4. 章节分割线 组件 4 -->
  <section style="padding:0 10px;">
    <section style="height:1px;background:linear-gradient(to right,transparent,#D4B5A0,#B5828C,#D4B5A0,transparent);margin:0;">
      <span leaf=""><br></span>
    </section>
  </section>

  <!-- 5. 第一章:为什么要做这件事(灰玫色编号)组件 5 -->
  <section style="margin-top:48px;margin-bottom:28px;padding:0 10px;">
    <section style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:14px;border-bottom:2px solid #E3DBD9;">
      <section style="display:flex;align-items:center;">
        <span style="display:inline-block;background:#B5828C;color:#FFFFFF;font-size:17px;font-weight:800;padding:5px 16px;border-radius:20px;margin-right:14px;line-height:1.3;"><span leaf="">01</span></span>
        <section>
          <p style="font-size:10px;color:#B5828C;font-weight:600;letter-spacing:3px;margin:0 0 2px;text-transform:uppercase;">
            <span leaf="">WHY WE DO THIS</span>
          </p>
          <h3 style="font-size:18px;font-weight:700;color:#4A4A4A;margin:0;letter-spacing:0.5px;">
            <span leaf="">为什么要做这件事</span>
          </h3>
        </section>
      </section>
    </section>

    <p style="margin-bottom:20px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">公众号编辑器限制很多,比如不能用</span>
      <span style="background:#F1F5F9;color:#B5828C;padding:1px 6px;border-radius:4px;font-family:'SF Mono',Consolas,Monaco,monospace;font-size:14px;"><span leaf="">&lt;style&gt;</span></span>
      <span leaf="">标签。</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">常见的坑</span></span>
      <span leaf="">有:</span>
    </p>

    <!-- 列表项转要点卡片 组件 12 要点列表卡片 -->
    <section style="background:#F5F1F0;border-radius:12px;padding:20px 20px;margin-bottom:24px;border:1px solid #E3DBD9;">
      <section style="display:flex;align-items:flex-start;margin-bottom:14px;">
        <span style="display:inline-block;width:4px;height:16px;background:#B5828C;border-radius:2px;margin-right:14px;margin-top:3px;flex-shrink:0;"></span>
        <p style="font-size:15px;color:#4A4A4A;margin:0;line-height:1.7;font-weight:600;"><span leaf="">样式必须全部内联</span></p>
      </section>
      <section style="display:flex;align-items:flex-start;">
        <span style="display:inline-block;width:4px;height:16px;background:#8BA3B0;border-radius:2px;margin-right:14px;margin-top:3px;flex-shrink:0;"></span>
        <p style="font-size:15px;color:#4A4A4A;margin:0;line-height:1.7;font-weight:600;"><span leaf="">所有文字要用 span 包裹</span></p>
      </section>
    </section>

    <p style="margin-bottom:8px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">下面是</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">排版前后的效果对比</span></span>
      <span leaf="">:</span>
    </p>

    <!-- 图片:排版前后对比 组件 10(主题专属图片容器) -->
    <section style="background:#FFFFFF;border-radius:12px;padding:6px;border:1px solid #E3DBD9;box-shadow:0 2px 12px -2px rgba(181,130,140,0.08);margin-bottom:8px;">
      <section style="margin:0;border-radius:8px;overflow:hidden;">
        <span leaf=""><img src="images/before-after.png" style="max-width:100%;"></span>
      </section>
    </section>
    <p style="font-size:12px;color:#A8A8A8;text-align:center;margin:0 0 24px;">
      <span leaf="">— 排版前后对比</span>
    </p>

    <p style="margin-bottom:8px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">还有一段</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">操作流程的动图演示</span></span>
      <span leaf="">:</span>
    </p>

    <!-- GIF:操作流程演示 组件 2b GIF 动图(通用库,角标换莫兰迪色) -->
    <section style="background:#FFFFFF;border-radius:12px;padding:6px;border:1px solid #E3DBD9;box-shadow:0 2px 12px -2px rgba(181,130,140,0.08);margin-bottom:8px;">
      <section style="margin:0;border-radius:8px;overflow:hidden;">
        <span leaf=""><img src="demo.gif" style="max-width:100%;"></span>
      </section>
    </section>
    <p style="text-align:center;margin:0 0 24px;">
      <span style="display:inline-block;background:#F2ECEC;color:#8A5A63;font-size:11px;font-weight:700;padding:1px 8px;border-radius:4px;margin-right:6px;"><span leaf="">GIF 动图</span></span>
      <span style="font-size:12px;color:#A8A8A8;"><span leaf="">操作流程演示</span></span>
    </p>

  </section>

  <!-- 6. 章节分割线 组件 4 -->
  <section style="padding:0 10px;">
    <section style="height:1px;background:linear-gradient(to right,transparent,#D4B5A0,#B5828C,#D4B5A0,transparent);margin:0;">
      <span leaf=""><br></span>
    </section>
  </section>

  <!-- 7. 第二章:核心方法(灰蓝色编号)组件 5 -->
  <section style="margin-top:48px;margin-bottom:28px;padding:0 10px;">
    <section style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:14px;border-bottom:2px solid #E3DBD9;">
      <section style="display:flex;align-items:center;">
        <span style="display:inline-block;background:#8BA3B0;color:#FFFFFF;font-size:17px;font-weight:800;padding:5px 16px;border-radius:20px;margin-right:14px;line-height:1.3;"><span leaf="">02</span></span>
        <section>
          <p style="font-size:10px;color:#8BA3B0;font-weight:600;letter-spacing:3px;margin:0 0 2px;text-transform:uppercase;">
            <span leaf="">CORE METHOD</span>
          </p>
          <h3 style="font-size:18px;font-weight:700;color:#4A4A4A;margin:0;letter-spacing:0.5px;">
            <span leaf="">核心方法</span>
          </h3>
        </section>
      </section>
    </section>

    <p style="margin-bottom:20px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">把</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">专家经验沉淀成组件库</span></span>
      <span leaf="">。</span>
      <span style="background:#F2ECEC;color:#8A5A63;padding:2px 7px;border-radius:4px;font-weight:600;"><span leaf="">组件库</span></span>
      <span leaf="">才是真正的资产,不是提示词。</span>
    </p>

    <!-- 引用金句 组件 8a 灰玫底左竖条 -->
    <section style="background:#F2ECEC;border-radius:0 12px 12px 0;border-left:4px solid #B5828C;padding:18px 22px;margin-bottom:24px;">
      <p style="font-size:16px;font-weight:700;color:#4A4A4A;margin:0;line-height:1.8;">
        <span leaf="">「好 Skill 不是一次写完,而是像代码质量一样持续维护。」</span>
      </p>
    </section>

    <p style="margin-bottom:20px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">行内用</span>
      <span style="background:#F1F5F9;color:#B5828C;padding:1px 6px;border-radius:4px;font-family:'SF Mono',Consolas,Monaco,monospace;font-size:14px;"><span leaf="">validate_gzh_html.py</span></span>
      <span leaf="">做</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">合规兜底</span></span>
      <span leaf="">,每次生成后必须跑一遍。</span>
    </p>

  </section>

  <!-- 8. 章节分割线 组件 4 -->
  <section style="padding:0 10px;">
    <section style="height:1px;background:linear-gradient(to right,transparent,#D4B5A0,#B5828C,#D4B5A0,transparent);margin:0;">
      <span leaf=""><br></span>
    </section>
  </section>

  <!-- 9. 结语章节(∞ 变体,回归灰玫)组件 5 -->
  <section style="margin-top:48px;margin-bottom:28px;padding:0 10px;">
    <section style="display:flex;align-items:center;justify-content:space-between;margin-bottom:20px;padding-bottom:14px;border-bottom:2px solid #E3DBD9;">
      <section style="display:flex;align-items:center;">
        <span style="display:inline-block;background:#B5828C;color:#FFFFFF;font-size:17px;font-weight:800;padding:5px 16px;border-radius:20px;margin-right:14px;line-height:1.3;"><span leaf="">∞</span></span>
        <section>
          <p style="font-size:10px;color:#B5828C;font-weight:600;letter-spacing:3px;margin:0 0 2px;text-transform:uppercase;">
            <span leaf="">CLOSING THOUGHTS</span>
          </p>
          <h3 style="font-size:18px;font-weight:700;color:#4A4A4A;margin:0;letter-spacing:0.5px;">
            <span leaf="">写在最后</span>
          </h3>
        </section>
      </section>
    </section>

    <p style="margin-bottom:20px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">每一次真实任务,都是在</span>
      <span style="border-bottom:2px solid #D4B5A0;font-weight:600;color:#4A4A4A;"><span leaf="">积累下一次能调用的能力资产</span></span>
      <span leaf="">。</span>
    </p>

  </section>

  <!-- 10. END 分割线 组件 14 -->
  <section style="padding:0 10px;">
    <section style="text-align:center;margin:0 0 32px;">
      <section style="display:flex;align-items:center;justify-content:center;">
        <span style="height:1px;width:60px;background:linear-gradient(to right,transparent,#B5828C);margin-right:14px;"></span>
        <span style="font-size:11px;color:#B5828C;letter-spacing:4px;font-weight:600;"><span leaf="">END</span></span>
        <span style="height:1px;width:60px;background:linear-gradient(to left,transparent,#B5828C);margin-left:14px;"></span>
      </section>
    </section>
  </section>

  <!-- 11. 尾部作者签名区 组件 15(原文签名并入此处,不重复) -->
  <section style="padding:0 10px;">
    <p style="margin-bottom:16px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">我是甲木,热衷于分享一些 AI 观察,AI 干货内容</span>
    </p>
    <p style="margin-bottom:20px;font-size:15px;line-height:1.8;text-align:justify;color:#6B6B6B;">
      <span leaf="">如果你觉得今天这篇有收获,欢迎</span>
      <strong style="color:#B5828C;"><span leaf="">点赞、在看、转发</span></strong>
      <span leaf="">三连,我们下篇见</span>
    </p>
  </section>

</section>
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall