Loading...
Loading...
Use when adding snippet support to a CloudCannon site, configuring MDX components, Hugo shortcodes or Eleventy shortcodes and includes for the Content Editor, debugging snippet round-trip issues, or setting up inline HTML snippets in markdown content.
npx skill4agent add cloudcannon/agent-skills cloudcannon-snippets_snippetscloudcannon-configurationcloudcannon-visual-editing| Doc | When to read |
|---|---|
| snippets.md | Start here. Overview of both layers, configuration hierarchy, which approach to use, snippet properties, toolbar setup, raw HTML snippets in |
| template-based.md | Component syntax matches a built-in template (most common path) |
| raw.md | Component needs custom syntax (e.g. |
| built-in-templates.md | Understanding built-in MDX, Hugo and Eleventy templates, the import bundle, parser internals |
| gotchas.md | Preventative rules — the pitfalls and their workarounds |
| troubleshooting.md | Symptom index — start here when something is already broken, it routes to the rule |
| SSG | Doc |
|---|---|
| Astro | astro/overview.md — MDX stack, |
| Hugo | hugo/overview.md — shortcodes, built-in shortcode imports, picking a Hugo template |
| Eleventy | eleventy/overview.md — shortcodes and includes, picking a Liquid or Nunjucks template, |
| Case | Approach |
|---|---|
| Component syntax matches a built-in template | Template-based — see template-based.md |
| Extra syntax, SSG directives, custom parsing | Raw — see raw.md |
Inline HTML in | Raw snippets — see snippets.md § Raw snippets for inline HTML |
| Same component at the start or end of 3+ files in a collection | Maybe a layout field — apply the tests in snippets.md § Snippet or layout field? and ask the user |
_snippets_editablessnippet: true_inputstype: imageview: gallerypicker_previewkey:| Excuse | Reality |
|---|---|
| "The built-in templates handle this" | Verify the round-trip. Built-in templates have known edge cases — see gotchas.md. |
| "I'll configure the snippet toolbar later" | No toolbar means editors can't insert snippets. Add |
| "This component is too niche for a snippet" | If editors encounter it in content, they need to be able to edit it. Configure it. |
| "Import statements in content are fine" | Use auto-import (Astro: |
"I can use | Don't. It loads catchall matchers that can match incorrectly. Write explicit |
"I configured | Without |
| "Inline image grid in MDX is fine as raw HTML" | Editors can't safely edit raw |