Getting started
Introduction
Learn what comark-kv is, how frontmatter kv blocks map to unstorage drivers, and how model paths work in Comark documents.
comark-kv is a Comark plugin. It declares a kv: block in frontmatter, backed by unstorage, and exposes a live writable kv.* namespace for two-way ::prop model binding.
Two forms
| Form | Frontmatter | Model paths |
|---|---|---|
| Single-driver | kv: { driver, mount, default } | kv.key |
| Multi-driver | kv: { ns: { driver, mount, default } } | kv.ns.key |
What it does
- Parses
kv:frontmatter at parse time into a descriptor ontree.meta.kv - Creates unstorage backends for each driver or namespace
- Exposes a runtime model with
getandseton dottedkv.*paths - Syncs with the UI through two-way
::propbindings on inputs and forms
Peer dependencies
comark is a peer dependency. vue is an optional peer for the comark-kv/vue composable.