Files
marqdo/ext/web/page.mq.md
T
cflmyandCursor 687c168014 feat(parse): use nested YAML import: maps instead of one-liner binds
Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target
entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the
old one-liner form, and migrate lib/ext/examples/tests/docs accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-23 19:33:58 +08:00

1.4 KiB

title, description, import
title description import
ext/web/page Document → View. Sole compose path is render(nodes=) with unified View schema (ADR 0007).
cap table
ext/web/_capability.mq.md lib/table.mq.md

page

+ `title`=""
+ `route`="/"
+ `method`="GET"
+ `body`=""
+ `nodes`=None
+ `data_source`=""
+ `data_order`=""
+ `data_where`=""

Web Document handle. Prefer constructing from Artifact Metadata via web.page facade. View tables use only |type|slot|value|attrs|style| (ZH |类型|槽|值|属性|样式|).

cap.load out =

_type title route method body nodes data_source data_order data_where
page title route method body nodes data_source data_order data_where

out

render

+ `nodes`=None
+ `db`=None

Render Document to HTML. nodes is the unified View table; when omitted, uses self.nodes or Markdown body.

cap.load n = nodes

  1. n == None n = nodes

_ = 1

  1. n > web_render_nodes page=self nodes=n db=db

body = body > web_render_document page=self body=body db=db

css

+ `css`

Escape hatch — append raw CSS (not a second primary language).

cap.load > web_page_css page=self css=css