orchard-core-theming
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOrchard Core Theming
Orchard Core 主题开发
Use this skill for Orchard Core theming and content-definition/recipe work.
本技能适用于Orchard Core主题开发以及内容定义/Recipe相关工作。
How to use
使用方法
- Path A (task match): scan the Tasks list; if the request matches, open and go directly to the leaf files.
references/TASK-MAP.md - Path B (exploration): use the section cues to pick a reference section, open that section's , then choose the leaf file it points to.
INDEX.md - Determine Razor vs Liquid early using the workflow in . If it cannot be decided, fall back to Liquid and confirm with the user.
references/TASK-MAP.md - Open only the necessary leaf files; use a section only for orientation and discovery.
INDEX.md - Prefer examples and ready-to-copy patterns.
- 路径A(任务匹配):查看任务列表;如果请求匹配,打开并直接访问对应的子文件。
references/TASK-MAP.md - 路径B(探索学习):根据章节提示选择参考章节,打开该章节的,然后选择其指向的子文件。
INDEX.md - 尽早通过中的工作流确定使用Razor还是Liquid模板。如果无法确定,默认使用Liquid并与用户确认。
references/TASK-MAP.md - 仅打开必要的子文件;仅在需要定位和查找时使用章节的。
INDEX.md - 优先使用示例和可直接复制的代码模式。
Evidence rules
证据规则
- Prefer repo evidence over assumptions: active theme, base theme, , and existing templates.
placement.json - Trace the shape model first when it is unclear; use to find shape tracing guidance and ask the user if needed.
references/TASK-MAP.md - Confirm unknown part/field properties in (or
ContentDefinition.json) and the relevant field references.OrchardCore.db - Ask for missing identifiers (content type, part name, field name, display type) instead of inventing them.
- Do not invent recipe steps or feature IDs; use to find the right recipe references.
references/TASK-MAP.md
- 优先使用仓库中的实际证据而非假设:包括当前主题、基础主题、以及现有模板。
placement.json - 当内容不明确时,首先追踪形状模型;使用中的形状追踪指南,必要时向用户询问。
references/TASK-MAP.md - 在(或
ContentDefinition.json)及相关字段参考中确认未知的部件/字段属性。OrchardCore.db - 若缺少标识符(内容类型、部件名称、字段名称、显示类型),请向用户询问,不要自行编造。
- 不要自行创建Recipe步骤或功能ID;使用查找正确的Recipe参考内容。
references/TASK-MAP.md
Scripts
脚本工具
Use these scripts instead of hand-building extracts.
- to extract content types/parts/fields from
scripts/extract-content-definitions.pyorContentDefinition.json, with optional related-type expansion and Markdown/JSON output. SeeOrchardCore.db.references/50-content-model/CONTENT-DEFINITIONS-EXTRACTOR.md - to get content items from
scripts/extract-content-items.py, filter by type/IDs/text, and optionally emit a recipeOrchardCore.dbstep or a Markdown/JSON extract. Seecontent.references/50-content-model/CONTENT-ITEMS-EXTRACTOR.md - to generate Orchard Core IDs that match the
scripts/generate-orchard-ids.pyalphabet for stableDefaultIdGeneratorvalues in recipes. SeeContentItemId.references/70-recipes/ID-GENERATION.md - to refresh the entire skill folder from the Lombiq/Orchard-Core-Agent-Skills repo (references, scripts, SKILL.md, assets). The running script is not overwritten until the next sync.
scripts/sync-skill.py
Sync example:
bash
python skills/orchard-core-theming/scripts/sync-skill.py使用以下脚本替代手动提取内容:
- :从
scripts/extract-content-definitions.py或ContentDefinition.json中提取内容类型/部件/字段,支持可选的相关类型扩展以及Markdown/JSON格式输出。详情请查看OrchardCore.db。references/50-content-model/CONTENT-DEFINITIONS-EXTRACTOR.md - :从
scripts/extract-content-items.py中获取内容项,可按类型/ID/文本过滤,还可选择性生成Recipe的OrchardCore.db步骤或Markdown/JSON格式的提取内容。详情请查看content。references/50-content-model/CONTENT-ITEMS-EXTRACTOR.md - :生成符合
scripts/generate-orchard-ids.py字母表的Orchard Core ID,用于Recipe中生成稳定的DefaultIdGenerator值。详情请查看ContentItemId。references/70-recipes/ID-GENERATION.md - :从Lombiq/Orchard-Core-Agent-Skills仓库刷新整个技能文件夹(包括参考文档、脚本、SKILL.md、资源文件)。当前运行的脚本将在下一次同步时才会被覆盖。
scripts/sync-skill.py
同步示例:
bash
python skills/orchard-core-theming/scripts/sync-skill.pyReference section cues
参考章节提示
Use these cues to decide which reference section to open.
- Use to confirm solution and theme structure (manifests, base theme), create themes, and locate layouts/zones.
references/10-understand-structure/ - Use to find shape names, alternates, placement rules, and override workflow steps.
references/20-shapes-placement/ - Use to implement Razor theme changes with tag helpers, shape rendering, and IOrchardHelper.
references/30-razor/ - Use to implement Liquid theme changes with tags, filters, and shape helpers.
references/40-liquid/ - Use to inspect content definitions/items, parts/fields, settings/containers, and the extractors.
references/50-content-model/ - Use to include scripts/styles and manage resources and static files.
references/60-assets-resources/ - Use to author, validate, and reuse recipes for setup, definitions, and content import.
references/70-recipes/ - Use to trace shapes, inspect logs, and find evidence in source.
references/80-debugging-discovery/ - Use to resolve terms and acronyms in Orchard Core theming docs.
references/90-glossary/
使用以下提示决定打开哪个参考章节:
- 使用确认解决方案和主题结构(清单、基础主题)、创建主题以及定位布局/区域。
references/10-understand-structure/ - 使用查找形状名称、替代模板、布局规则以及重写工作流步骤。
references/20-shapes-placement/ - 使用通过标签助手、形状渲染和IOrchardHelper实现Razor主题修改。
references/30-razor/ - 使用通过标签、过滤器和形状助手实现Liquid主题修改。
references/40-liquid/ - 使用检查内容定义/项、部件/字段、设置/容器以及提取工具。
references/50-content-model/ - 使用添加脚本/样式并管理资源和静态文件。
references/60-assets-resources/ - 使用编写、验证和复用用于安装设置、定义导入和内容导入的Recipe。
references/70-recipes/ - 使用追踪形状、检查日志以及在源码中查找证据。
references/80-debugging-discovery/ - 使用解析Orchard Core主题开发文档中的术语和缩写。
references/90-glossary/
Tasks
任务列表
Use this list to decide whether to open for the exact leaf files.
references/TASK-MAP.md- Determine template language (Razor vs Liquid).
- Add or update a content type/part/field in ContentDefinition.json.
- Extract a focused content definition slice (large JSON).
- Create a setup recipe.
- Add content types and sample content to a recipe.
- Create or update workflows in a recipe.
- Create or override a content item shape template.
- Implement or override OrchardCore.Forms widgets and Form content.
- Inspect real content items (SQLite).
- Update a shape after adding fields.
- Render BagPart/FlowPart/ListPart items.
- Add scripts/styles and include them in the layout.
- Find shape alternates and placement rules.
- Find evidence in Orchard Core source.
- Work on theme structure or layout.
- Understand solution structure.
使用此列表决定是否打开以获取对应的子文件:
references/TASK-MAP.md- 确定模板语言(Razor vs Liquid)。
- 在ContentDefinition.json中添加或更新内容类型/部件/字段。
- 提取聚焦的内容定义片段(大型JSON)。
- 创建安装设置Recipe。
- 向Recipe中添加内容类型和示例内容。
- 在Recipe中创建或更新工作流。
- 创建或重写内容项形状模板。
- 实现或重写OrchardCore.Forms小部件和表单内容。
- 检查实际内容项(SQLite)。
- 添加字段后更新形状。
- 渲染BagPart/FlowPart/ListPart项。
- 添加脚本/样式并将其包含在布局中。
- 查找形状替代模板和布局规则。
- 在Orchard Core源码中查找证据。
- 处理主题结构或布局。
- 理解解决方案结构。