infographic-template-updater

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Infographic Template Updater

信息图模板更新指南

Overview

概述

Update public template lists and gallery mappings when new templates are added in
src/templates
.
当在
src/templates
中添加新模板时,更新公开模板列表和画廊映射。

Workflow

工作流程

  1. Collect new template names from the added
    src/templates/*.ts
    file (object keys).
    • If templates are composed via spreads (e.g.
      ...listZigzagTemplates
      ), also confirm the final keys in
      src/templates/built-in.ts
      .
  2. Update template lists:
    • .skills/infographic-creator/SKILL.md
      in the "Available Templates" list.
    • site/src/components/AIPlayground/Prompt.ts
      in the template list.
    • .skills/infographic-syntax-creator/references/prompt.md
      in the template list. Keep existing ordering/grouping; add new
      list-*
      entries near other list templates.
  3. Sanity check with
    rg -n "<template-name>"
    across the above files to confirm presence.
  1. 从新增的
    src/templates/*.ts
    文件(对象键)中收集新模板名称。
    • 如果模板通过展开语法组合(例如
      ...listZigzagTemplates
      ),还需确认
      src/templates/built-in.ts
      中的最终键。
  2. 更新模板列表:
    • 更新
      .skills/infographic-creator/SKILL.md
      中的「可用模板」列表。
    • 更新
      site/src/components/AIPlayground/Prompt.ts
      中的模板列表。
    • 更新
      .skills/infographic-syntax-creator/references/prompt.md
      中的模板列表。 保留现有排序/分组;将新的
      list-*
      条目添加到其他列表模板附近。
  3. 使用
    rg -n "<template-name>"
    在上述文件中进行完整性检查,确认新模板已存在。

Notes

注意事项

  • Do not remove or rename existing entries.
  • Keep template names exact and lower-case.
  • If a template needs example data, update or extend
    site/src/components/Gallery/datasets.ts
    to match its structure.
  • 请勿删除或重命名现有条目。
  • 保持模板名称准确且为小写。
  • 如果模板需要示例数据,请更新或扩展
    site/src/components/Gallery/datasets.ts
    以匹配其结构。