openpress-create-pages
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenPress Create Pages
OpenPress 创建页面
This skill owns page-artifact structure and content judgment. owns CLI lifecycle and delivery; owns revision mode for existing authored content.
openpressopenpress-collaborate本技能负责页面制品的结构与内容判断。 负责CLI生命周期与交付; 负责已有创作内容的修订模式。
openpressopenpress-collaborateSetup
安装设置
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 , then extend the generated minimal pages Press. Do not force a non-empty target.
npm create @open-press <target> -- --type pages - Existing workspace: inspect , choose a new slug, run
press/*/press.tsx, then extend only the newopen-press create <slug> --type pages --title "<title>".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- 全新空文件夹:使用 ,然后扩展生成的极简页面Press。请勿强制在非空目标中执行。
npm create @open-press <target> -- --type pages - 已有工作区:检查 ,选择新的slug,运行
press/*/press.tsx,然后仅扩展新的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 for reports, proposals, whitepapers, papers, books, teaching notes, and handbooks. Ask only when custom geometry is required.
page="a4" - Keep geometry on , not in CSS.
<Press page> - Register public MDX sources in ; keep internal planning in
press/<slug>/press.tsx,press/design.md, or skills.memory/ - Keep artifact-local components, media, and theme under ; use
press/<slug>/only for intentional cross-Press reuse.press/shared/ - 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: ...], or[DRAFT: ...]instead of inventing it.[FIX: ...]
Read before creating the folder tree or Press TSX. Read before writing theme or page components.
references/press-tree.mdreferences/theme.md编写前需收集文档概要及确认的素材。OpenPress 特定的默认规则与约束:
- 报告、提案、白皮书、论文、书籍、教学笔记和手册需使用 。仅当需要自定义尺寸时才询问。
page="a4" - 将页面尺寸设置在 上,而非CSS中。
<Press page> - 在 中注册公开的MDX源;将内部规划内容放在
press/<slug>/press.tsx、press/design.md或技能相关目录中。memory/ - 将制品专属的组件、媒体和主题放在 下;仅当需要跨Press复用内容时才使用
press/<slug>/。press/shared/ - 使用自托管的授权字体或系统 fallback 字体;最终主题不得依赖远程字体CSS。
- 保留已确认的事实。缺失内容标记为 、
[TODO: ...]或[DRAFT: ...],切勿自行编造。[FIX: ...]
在创建文件夹结构或Press TSX前,请阅读 。在编写主题或页面组件前,请阅读 。
references/press-tree.mdreferences/theme.mdDocument 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 before captioned tables; OpenPress owns figure/table numbering.
<TableCaption> - When prose refers to a figure or table, give the target a stable semantic ID and write or
@fig-stable-nameinstead of a literal number. OpenPress resolves the current localized number during render. Read@tbl-stable-name→ Caption Targets And Semantic References before authoring these links.references/press-tree.md - When the author explicitly wants the following content to start on a new page, put immediately before it. Do not recreate that intent with spacer content or increasingly specific pagination CSS.
<PageBreak />
For learner-facing documents, show state-changing procedures and expected results where they aid verification. Load when specialized diagrams, architecture figures, or visual tools are needed.
openpress-plugins- :仅用于文档标题或封面标识。
# - :正式章节或文档单元;会进入目录(TOC)。
## - :主要主题组;会进入目录(TOC)。
### - :本地流程、定理、示例或参考条目;通常不纳入目录。
#### - 带标题的表格前需放置 ;OpenPress 负责图/表的编号。
<TableCaption> - 当正文提及图或表时,为目标设置稳定的语义ID,并使用 或
@fig-stable-name替代字面数字。OpenPress 会在渲染时解析当前本地化编号。创作此类链接前,请阅读@tbl-stable-name→ 标题目标与语义引用部分。references/press-tree.md - 当作者明确希望后续内容从新页面开始时,在其前立即放置 。请勿使用间隔内容或过于特定的分页CSS来实现此需求。
<PageBreak />
对于面向学习者的文档,展示状态变更流程及预期结果以帮助验证。当需要专业图表、架构图或可视化工具时,加载 。
openpress-pluginsVerify
验证
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 --jsonThen follow → Review And Delivery Gate. A successful build or PDF export alone is not page-layout verification.
openpressReport 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然后遵循 → 评审与交付环节的流程。仅成功构建或PDF导出并不等同于页面布局验证。
openpress报告Press的slug、标题、尺寸、源根目录、已编写文件、未解决的输入项以及最新的验证结果。
Boundaries
边界
- Do not use create commands for upgrades or migrations.
- Do not edit generated output or publish from this skill.
- 请勿使用创建命令进行升级或迁移。
- 请勿编辑生成的输出内容,也不要通过本技能发布内容。