Bindings

Roots

What `{{ path }}`, `:prop="path"` and `::prop="path"` can point to.

Comark renderers resolve bindings against { frontmatter, meta, data, props }. The editor completes the same roots, segment by segment:

RootKeys come fromOffered
frontmatterthis document's frontmatter, parsed livealways
propsthe nearest enclosing component that has its own attributes: its attribute block, its YAML props block, manifest defaultsinside such a component (not on its own opener)
datathe host's data / dataSchemawhen configured
metathe host's meta / metaSchema, plus plugins (title, description, toc, summary)when configured or a plugin adds keys
loop variablesscope of an enclosing component, e.g. ::forinside it
---
site:
  name: My Blog
---

Welcome to {{ frontmatter.site.name || our site }}.

::card{title="Hello" variant="ghost"}
:badge{:label="props.title"}
::
  • Objects show › and drill in with → or .; leaves show their current value.
  • After a complete path and a space, || adds a fallback; the next menu offers the current value.
  • :prop="…" on a boolean prop also offers true and false.
  • ::prop="…" (two-way) only offers writable roots — data by default.
  • Paths that do not start with a root ($doc.snippet.link) are passed through by comark and left alone.

Lint and hover

A path that leaves a known shape is reported with a suggestion — frontmatter.titel → "did you mean title?" — and a quick fix. The frontmatter is always known completely; data is known completely when you give a schema. Hover shows a path's current value.

Copyright © 2026