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>
This commit is contained in:
cflmyandCursor committed 2026-10-23 19:33:58 +08:00
1 parent 8bbe017a5e
commit 687c168014
364 files changed
+1870 -1004

No files matched your search

+2 -1
View File
@@ -1,7 +1,8 @@
---
title: GAP-06/07 star + JSON array body keep following stmts
description: Nested args=`args` and text=["…"] must not truncate the ## body.
import json:lib/json.mq.md
import:
json: lib/json.mq.md
---
# main
+3 -2
View File
@@ -1,7 +1,8 @@
---
title: import official lib (Chinese)
导入 文本:lib/文本.mq.md
导入 表:lib/表.mq.md
导入:
文本: lib/文本.mq.md
表: lib/表.mq.md
---
# main
+2 -1
View File
@@ -1,6 +1,7 @@
---
title: 跨文件导入示例
import utils:utils.mq.md
import:
utils: utils.mq.md
---
# main
+2 -1
View File
@@ -1,6 +1,7 @@
---
title: inherit explicit parent constructor
import json:lib/json.mq.md
import:
json: lib/json.mq.md
---
# Parent
+2 -1
View File
@@ -1,6 +1,7 @@
---
title: inherit parent method
import json:lib/json.mq.md
import:
json: lib/json.mq.md
---
# Greeter
+2 -1
View File
@@ -4,7 +4,8 @@ model: ${env.MARQDO_META_MODEL ?? "default-model"}
greeting: "Hello ${env.MARQDO_META_USER ?? "World"}"
tokens: ${int(env.MARQDO_META_TOKENS ?? "16")}
api_key: ${secret.MARQDO_META_SECRET ?? "sk-test"}
import sys:lib/sys.mq.md
import:
sys: lib/sys.mq.md
---
# main
+2 -1
View File
@@ -1,6 +1,7 @@
---
title: three-segment library path
import helpers:helpers.mq.md
import:
helpers: helpers.mq.md
---
# main
+3 -2
View File
@@ -1,7 +1,8 @@
---
title: frontmatter use short name
import text:lib/text.mq.md
import trim_text:text.str_trim
import:
text: lib/text.mq.md
trim_text: text.str_trim
---
# main
+2 -1
View File
@@ -1,6 +1,7 @@
---
title: object handle smoke
import json:lib/json.mq.md
import:
json: lib/json.mq.md
---
# counter