openpress-create-pages

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenPress Create Pages

OpenPress 创建页面

This skill owns page-artifact structure and content judgment.
openpress
owns CLI lifecycle and delivery;
openpress-collaborate
owns revision mode for existing authored content.
本技能负责页面制品的结构与内容判断。
openpress
负责CLI生命周期与交付;
openpress-collaborate
负责已有创作内容的修订模式。

Setup

安装设置

OpenPress requires Node 20 or newer. Detect whether the workspace already has a Press:
bash
node -v
find press -mindepth 2 -maxdepth 2 -name press.tsx -print -quit 2>/dev/null | grep -q . && echo EXISTING || echo FRESH
  • Fresh empty folder: use
    npm create @open-press <target> -- --type pages
    , then extend the generated minimal pages Press. Do not force a non-empty target.
  • Existing workspace: inspect
    press/*/press.tsx
    , choose a new slug, run
    open-press create <slug> --type pages --title "<title>"
    , then extend only the new
    press/<slug>/
    .
OpenPress 需要 Node 20 或更高版本。检测工作区是否已存在Press:
bash
node -v
find press -mindepth 2 -maxdepth 2 -name press.tsx -print -quit 2>/dev/null | grep -q . && echo EXISTING || echo FRESH
  • 全新空文件夹:使用
    npm create @open-press <target> -- --type pages
    ,然后扩展生成的极简页面Press。请勿强制在非空目标中执行。
  • 已有工作区:检查
    press/*/press.tsx
    ,选择新的slug,运行
    open-press create <slug> --type pages --title "<title>"
    ,然后仅扩展新的
    press/<slug>/
    目录。

Page Contract

页面约定

Gather the document brief and confirmed source material before writing. OpenPress-specific defaults and constraints:
  • Use
    page="a4"
    for reports, proposals, whitepapers, papers, books, teaching notes, and handbooks. Ask only when custom geometry is required.
  • Keep geometry on
    <Press page>
    , not in CSS.
  • Register public MDX sources in
    press/<slug>/press.tsx
    ; keep internal planning in
    press/design.md
    ,
    memory/
    , or skills.
  • Keep artifact-local components, media, and theme under
    press/<slug>/
    ; use
    press/shared/
    only for intentional cross-Press reuse.
  • Use self-hosted licensed fonts or system fallbacks; final themes must not depend on remote font CSS.
  • Preserve confirmed facts. Mark missing material as
    [TODO: ...]
    ,
    [DRAFT: ...]
    , or
    [FIX: ...]
    instead of inventing it.
Read
references/press-tree.md
before creating the folder tree or Press TSX. Read
references/theme.md
before writing theme or page components.
编写前需收集文档概要及确认的素材。OpenPress 特定的默认规则与约束:
  • 报告、提案、白皮书、论文、书籍、教学笔记和手册需使用
    page="a4"
    。仅当需要自定义尺寸时才询问。
  • 将页面尺寸设置在
    <Press page>
    上,而非CSS中。
  • press/<slug>/press.tsx
    中注册公开的MDX源;将内部规划内容放在
    press/design.md
    memory/
    或技能相关目录中。
  • 将制品专属的组件、媒体和主题放在
    press/<slug>/
    下;仅当需要跨Press复用内容时才使用
    press/shared/
  • 使用自托管的授权字体或系统 fallback 字体;最终主题不得依赖远程字体CSS。
  • 保留已确认的事实。缺失内容标记为
    [TODO: ...]
    [DRAFT: ...]
    [FIX: ...]
    ,切勿自行编造。
在创建文件夹结构或Press TSX前,请阅读
references/press-tree.md
。在编写主题或页面组件前,请阅读
references/theme.md

Document Structure

文档结构

  • #
    : document title or cover identity only.
  • ##
    : formal chapter or document unit; enters the TOC.
  • ###
    : major topic group; enters the TOC.
  • ####
    : local procedure, theorem, example, or reference item; normally stays out of the TOC.
  • Put
    <TableCaption>
    before captioned tables; OpenPress owns figure/table numbering.
  • When prose refers to a figure or table, give the target a stable semantic ID and write
    @fig-stable-name
    or
    @tbl-stable-name
    instead of a literal number. OpenPress resolves the current localized number during render. Read
    references/press-tree.md
    Caption Targets And Semantic References before authoring these links.
  • When the author explicitly wants the following content to start on a new page, put
    <PageBreak />
    immediately before it. Do not recreate that intent with spacer content or increasingly specific pagination CSS.
For learner-facing documents, show state-changing procedures and expected results where they aid verification. Load
openpress-plugins
when specialized diagrams, architecture figures, or visual tools are needed.
  • #
    :仅用于文档标题或封面标识。
  • ##
    :正式章节或文档单元;会进入目录(TOC)。
  • ###
    :主要主题组;会进入目录(TOC)。
  • ####
    :本地流程、定理、示例或参考条目;通常不纳入目录。
  • 带标题的表格前需放置
    <TableCaption>
    ;OpenPress 负责图/表的编号。
  • 当正文提及图或表时,为目标设置稳定的语义ID,并使用
    @fig-stable-name
    @tbl-stable-name
    替代字面数字。OpenPress 会在渲染时解析当前本地化编号。创作此类链接前,请阅读
    references/press-tree.md
    标题目标与语义引用部分。
  • 当作者明确希望后续内容从新页面开始时,在其前立即放置
    <PageBreak />
    。请勿使用间隔内容或过于特定的分页CSS来实现此需求。
对于面向学习者的文档,展示状态变更流程及预期结果以帮助验证。当需要专业图表、架构图或可视化工具时,加载
openpress-plugins

Verify

验证

Scan authored source before the shared review gate:
bash
open-press search . "[TODO:" --scope all --json
open-press search . "[DRAFT:" --scope all --json
open-press search . "[FIX:" --scope all --json
Then follow
openpress
Review And Delivery Gate. A successful build or PDF export alone is not page-layout verification.
Report the Press slug, title, geometry, source root, files written, unresolved inputs, and fresh verification results.
在共享评审环节前扫描创作的源文件:
bash
open-press search . "[TODO:" --scope all --json
open-press search . "[DRAFT:" --scope all --json
open-press search . "[FIX:" --scope all --json
然后遵循
openpress
评审与交付环节的流程。仅成功构建或PDF导出并不等同于页面布局验证。
报告Press的slug、标题、尺寸、源根目录、已编写文件、未解决的输入项以及最新的验证结果。

Boundaries

边界

  • Do not use create commands for upgrades or migrations.
  • Do not edit generated output or publish from this skill.
  • 请勿使用创建命令进行升级或迁移。
  • 请勿编辑生成的输出内容,也不要通过本技能发布内容。