Files
marqdo/examples/marqdo-blog
cflmy ecd7d5e433 examples: 新增 oa2026-showcase(2026 开源项目大赛作品介绍示例集)
五个可运行示例,覆盖 Marqdo 的核心能力面:

| 文件 | 展示 |
|------|------|
| add.mq.md | 叙述统一、粗体即代码、斜体即返回 |
| invoice.mq.md | 表格即数据、循环、分支、断言 |
| calculus.mq.md | 公式即变量、求导、求根、绘图 |
| bell.mq.md | 量子电路、概率、断言、SVG 派生物 |
| foreign-node.mq.md | 外联一次性执行、持久会话、显式传值 |

全部实测跑通(1.5.2),输出与 README「预期输出」一节一致:
- add → 42
- invoice → 960 / 912 / 966 / within-cap
- calculus → 3*x^2 - 3 / 9 / [-1.73, 0, 1.73] / plot-ok
- bell → {00: 0.5, 11: 0.5} / bell-00-ok / bell-11-ok / bell-draw-ok
- foreign-node → 区域汇总表 + 持久会话复读

仓库侧改动:
- examples/oa2026-showcase/*.svg 随示例入库(README 有说明,属固定产物)
- .gitignore 忽略根目录 bell-*.svg / calculus-*.svg —— 从仓库根运行示例时
  draw/plot 会把 SVG 写到 cwd,那是运行产物不是源文件
- examples/marqdo-blog/db/posts.mq.md 首行正文去掉了内嵌 `#` 标题写法
2026-10-22 10:41:41 +08:00
..

examples/marqdo-blog

Marqdo Web Artifact blog (ADR 0007).

Layout

index.mq.md          # type: web · / · data_source: posts
pages/about.mq.md    # 类型: 网页 · /about
pages/post.mq.md     # type: web · /post/{slug} · data_where
api/ping.mq.md       # type: endpoint · GET /api/ping
api/echo.mq.md       # type: endpoint · POST /api/echo
db/posts.mq.md       # ext/data schema + seed + open
public/              # static (mounted at /static)
serve.mq.md          # web.serve + db open
smoke.sh             # curl checks against a running serve

Run

bash scripts/build-web-plugin.sh
export MARQDO_EXT=$PWD/ext   # if ~/.marqdo/ext is stale
export MARQDO_WEB_PLUGIN=$PWD/plugins/web/build/libweb.so
cd examples/marqdo-blog && marqdo run serve.mq.md
# other terminal:
bash examples/marqdo-blog/smoke.sh
Path Artifact
/ Document home + post cards
/about ZH Document
/post/{slug} Document detail
/api/ping Endpoint JSON
/api/echo Endpoint JSON echo
/static/* public assets

Design: ext-web-artifact.md.