cloudcannon/agent-skills

cloudcannon-visual-editing

Use when adding Visual Editor support to a CloudCannon site, setting up editable regions, debugging visual editing issues, or making page sections editable in the CloudCannon preview.

Vedi sorgente

Come usare

  1. Copia il comando e controlla il pacchetto prima di installarlo nel tuo ambiente agente.
  2. Controlla strumenti, credenziali e ambienti richiesti nel documento originale.
  3. Descrivi input e risultato desiderato; confronta l’output con le fonti.
npx skills add https://github.com/cloudcannon/agent-skills --skill cloudcannon-visual-editing

Prima di iniziare

  • L’installazione non include abbonamenti, quote API o accesso ai file.
  • Stelle e installazioni indicano attività, non un test indipendente di qualità o sicurezza.
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

CloudCannon Visual Editing

@cloudcannon/editable-regions makes page elements interactive in CloudCannon's Visual Editor. This skill covers the editable regions API, integration setup, and SSG-specific patterns for wiring up text, image, array, and component editables.

When to use

  • Adding Visual Editor support to a new or existing CloudCannon site
  • Making page sections editable (text, images, arrays, components)
  • Setting up component re-rendering for live preview
  • Debugging editable regions that aren't appearing or updating
  • Adding editable regions to shared partials backed by data files

When not to use

  • The field has no `_inputs` entry or the collection is unconfigured — configure it first with `cloudcannon-configuration`. An editable region with no matching Input errors in the editor.
  • Editors need to insert new markup inside rich text — that is `cloudcannon-snippets`. Editable regions edit what is already rendered.
  • The site uses Bookshop (*.bookshop.yml files, @bookshop/* packages, _bookshop_name keys) — start at `cloudcannon-bookshop`. It routes back here for the regions.
  • A page will not open in the Visual Editor at all — that is usually a wrong collection url, not a region problem. See cloudcannon-configuration/collection-urls.md.

Contents

DocWhen to read
editable-regions.mdStart here. Region types, the attribute reference, custom-element equivalents
visual-editing.mdSection census, completeness checklist, pre-handoff sweep — every SSG
visual-editing-reference.mdOn demand. Data-prop paths, arrays, page builders, components, source editables
editable-regions-internals.mdThe Visual Editor JavaScript API; lifecycle traces and quirks when debugging
troubleshooting.mdSymptom → fix, when regions do not appear, update, or write where expected

SSG-specific:

Enter through the SSG's overview.md; it gives the reading order for that SSG's files.

SSGDocPurpose
Astroastro/overview.mdStart here for Astro — reading order and what each file covers
Astroastro/visual-editing.mdSetup workflow, infrastructure checklist, Astro checklist items
Astroastro/visual-editing-reference.mdAstro's deltas from the generic pattern reference (read on demand)
Astroastro/troubleshooting.mdAstro-specific symptom → fix
Hugohugo/overview.mdStart here for Hugo — reading order and what each file covers
Hugohugo/visual-editing.mdModule setup, infrastructure checklist, Hugo checklist items, local checks
Hugohugo/visual-editing-reference.mdHugo's deltas: partials-only re-render, ENV_CLIENT, what the editor's Hugo has
Hugohugo/troubleshooting.mdHugo-specific symptom → fix
Eleventyeleventy/overview.mdStart here for Eleventy — Liquid or Nunjucks path, reading order
Eleventyeleventy/visual-editing.mdPlugin setup per path, infrastructure checklist, Eleventy checklist items, local checks
Eleventyeleventy/visual-editing-reference.mdEleventy's deltas: includes as components, the config in the browser, Nunjucks sites
Eleventyeleventy/troubleshooting.mdEleventy-specific symptom → fix

Scripts:

ScriptPurpose
scripts/setup-editable-regions-astro.shAstro only. Installs package, wires Astro integration, creates registerComponents.ts stub. Hugo and Eleventy need no script — see their visual-editing.md

Other skills:

SkillWhen to read
make-site-multilingualThe site is multilingual. Translation keys (data-rosey) must sit on region hosts rather than inside them, and component regions need explicit key passthrough
cloudcannon-dev-serverThe regions are written and the user needs to try them. Starts a local CloudCannon that rebuilds as they edit

Quick reference

Region typeUse forKey attributes
textInline rich textdata-editable="text" data-prop data-type
imageImage pickerdata-editable="image" data-prop (or data-prop-src/data-prop-alt)
arrayList CRUDdata-editable="array" data-prop on container
array-itemEach list itemdata-editable="array-item" on each child
componentRe-rendering sectionsdata-editable="component" data-component data-prop
sourceHardcoded text in templatesdata-editable="source" data-path data-key

Rule of thumb: Use component when a section has conditional elements, style bindings, or derived content. Nest primitives (text, image, array) inside components for inline editing.

Workflow

  1. Setup — Install and wire the integration per the SSG's visual-editing.md (Astro: setup script + conditional registerComponents import; Hugo: module import + editable-regions partial; Eleventy: plugin + conditional register-components.js import on Liquid sites, nothing on Nunjucks sites)
  2. Census — Document every visible section on every key page with treatment decisions (visual-editing.md § Section census)
  3. Implement — Work through sections, adding editable attributes per the census
  4. Verify — Run the completeness checklist in visual-editing.md, then the SSG's extra items

Checklist reinforcement

The SSG-specific workflow docs contain detailed completeness checklists. These are not optional.

  • Read the checklist BEFORE starting so you know what to aim for
  • You are not done until every checklist item is verified
  • Every section in the census must have editable regions OR a documented sidebar-only justification with a specific technical reason
  • Don't mark arrays as done without nested editables on their items — CRUD controls alone are not sufficient

Common mistakes

ExcuseReality
"Text editables are enough for this page"Check images, arrays, and components too. Text-only is a half-finished job.
"This component is too complex for editable regions"If it renders data from a content collection, it should be editable. Simplify the component or wrap it in editable-component for sidebar re-rendering.
"The footer/nav doesn't need editables"Shared partials need data-file-backed editables. Every visible section needs a treatment.
"Array items just need add/remove controls"Without nested text/image editables on items, editors can't edit field values inline.
"I'll register components later"Components the integration can't resolve can't re-render. Wire them as you go (Astro: register; Hugo: make it a partial; Eleventy: make it a Liquid include).
"Source editables aren't needed — this text rarely changes"If it's visible, it should be editable -- but the mechanism depends on the page. Data file for shared UI; for page text, see visual-editing-reference.md § When to use source editables.
"I'll source-editable any hardcoded string on a page"Page builder is the default; source editables are the exception, for one-off pages whose structure stays with the developer. If editors need to add, remove or reorder sections, use a page builder. See visual-editing-reference.md § When to use source editables.
dallo stesso repository

Altri Skills

Tutti gli Skills
cloudcannon
Community

brainstorming

Structured design dialogue before CloudCannon work that has more than one sensible answer — a migration's editability tradeoffs, how to model a collection or page builder, restructuring content or config, or an ambiguous "make this work with CloudCannon". Explores intent and constraints, then presents a design for approval before implementation. Not for single well-defined tasks, clear bug fixes, or a detailed spec.

Installazioni / 1h
7
GitHub Stars
9
Aggiornato
28 ott
cloudcannon
Community

cloudcannon-bookshop

Use when a CloudCannon site uses Bookshop — .bookshop.yml files, @bookshop/ packages, bookshopname keys, bookshop:live, or partial "bookshop" calls or {% bookshop %} tags. Covers how Bookshop works, maintaining a site that stays on it, and migrating it to editable regions.

Installazioni / 1h
7
GitHub Stars
9
Aggiornato
28 ott
cloudcannon
Community

cloudcannon-cli

Use when running the CloudCannon CLI — logging in, listing or creating sites, reading and writing files on a hosted site, triggering and inspecting builds, changing a site's build configuration, reading form submissions, or finding out which command and flags exist for a task.

Installazioni / 1h
7
GitHub Stars
9
Aggiornato
28 ott
cloudcannon
Community

cloudcannon-configuration

Use when configuring a site for CloudCannon for any of the following. Download the JSON schemas before writing any configuration (see the top of SKILL.md). - Setting up cloudcannon.config.yml or .cloudcannon/initial-site-settings.json - Generating a baseline with the CloudCannon CLI - Adding or modifying Collections, Inputs, Structures, or Select Data - Setting up Structures for Array and Object Inputs - Configuring Collection URLs - Troubleshooting missing fields or Input types

Installazioni / 1h
7
GitHub Stars
9
Aggiornato
28 ott