一键导入
content-and-shortcodes
Protocols for handling content, shortcodes, YAML frontmatter, and Twig within StaticForge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Protocols for handling content, shortcodes, YAML frontmatter, and Twig within StaticForge.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Critical security and deployment protocols for editing code, handling credentials, and publishing StaticForge.
Architectural guidelines for developing new self-contained Features in StaticForge.
Development workflow for StaticForge using strict PHP and the Lando environment wrapper.
| name | content-and-shortcodes |
| description | Protocols for handling content, shortcodes, YAML frontmatter, and Twig within StaticForge. |
| applyTo | content/**/*.md, templates/**/*.twig |
This skill dictates how to process, sanitize, and inject content/ input and Twig template logic safely and properly.
Format Requirements:
Content must be authored as .md or .html inside content/ and must include a YAML frontmatter block for metadata mapping.
Template Variables:
Twig templates should avoid overly complex logic. Logic belongs in Features, while presentation bindings belong in Twig ({{ variable }}). Look into TemplateVariableBuilder and BaseRendererFeature when mapping variables to Twig output.
Input Sanitization & Output Encoding:
All user inputs from content frontmatter variables must be sanitized before being mapped to layouts. Use the EiccUtils sanitation patterns and ensure proper CSRF protection handles any generated HTML forms.
Event Lifecycle Hooks for Shortcodes:
When implementing custom shortcodes inside the code (PRE_RENDER), ensure they inject correctly over the HTML/Markdown prior to full transformation (RENDER). Maintain strict string replacements. Do not assume HTML encoding. Always check against missing variables so a build process doesn't fatal due to incomplete frontmatter.