Release 2.7.0: executable handbooks and native user-site workflows

This commit is contained in:
cflmy committed 2026-11-10 17:03:06 +08:00
1 parent aa0c4d0f55
commit d9aef957f7
562 files changed
+21064 -20387

No files matched your search

@@ -9,10 +9,14 @@ markup: occlusion
# main
| 返回 | 类型 | 说明 |
|---|---|---|
| result | any | The value explicitly returned below; conditional returns follow the selected branch |
`result` =
| ok | ping |
|----|------|
| True | pong |
*result*
After these steps, return *result*.
@@ -14,5 +14,5 @@ import:
此叶子只负责footer/brand 的 Markdown 内容,父组件决定排列。修改文字只改相邻 content.md,
不添加 HTML 标签或内部分栏;出现第二种布局职责时再开子目录。
**body = 文件.读文本 路径="components/footer/brand/content.md"**
*> 组件.正文 文本=`body` 槽="footer-brand"*
We first **body = [Compute body](文件.读文本(路径="components/footer/brand/content.md"))** for the next step.
After these steps, return *组件.正文(文本=`body`, 槽="footer-brand")*.
@@ -17,8 +17,8 @@ import:
若子块仍含独立分栏,就继续沿对应目录的 index.mq.md 分解。
不要把渲染后的字符串放回值列,子节点在整个装配过程中保持结构。
**brand_nodes = > brand.节点**
**links_nodes = > links.节点**
**siblings = 组件.合并 甲=`brand_nodes` 乙=`links_nodes`**
**footer_columns = 布局.分栏 子节点=`siblings` 槽="footer"**
*> 组件.包裹 子节点=`footer_columns` 种类="footer" 槽="footer"*
We first **brand_nodes = [Compute brand_nodes](brand.节点())** for the next step.
We first **links_nodes = [Compute links_nodes](links.节点())** for the next step.
We first **siblings = [Compute siblings](组件.合并(甲=`brand_nodes`, 乙=`links_nodes`))** for the next step.
We first **footer_columns = [Compute footer_columns](布局.分栏(子节点=`siblings`, 槽="footer"))** for the next step.
After these steps, return *组件.包裹(子节点=`footer_columns`, 种类="footer", 槽="footer")*.
@@ -14,5 +14,5 @@ import:
此叶子只负责footer/links/community 的 Markdown 内容,父组件决定排列。修改文字只改相邻 content.md,
不添加 HTML 标签或内部分栏;出现第二种布局职责时再开子目录。
**body = 文件.读文本 路径="components/footer/links/community/content.md"**
*> 组件.正文 文本=`body` 槽="footer-links-community"*
We first **body = [Compute body](文件.读文本(路径="components/footer/links/community/content.md"))** for the next step.
After these steps, return *组件.正文(文本=`body`, 槽="footer-links-community")*.
@@ -14,5 +14,5 @@ import:
此叶子只负责footer/links/docs 的 Markdown 内容,父组件决定排列。修改文字只改相邻 content.md,
不添加 HTML 标签或内部分栏;出现第二种布局职责时再开子目录。
**body = 文件.读文本 路径="components/footer/links/docs/content.md"**
*> 组件.正文 文本=`body` 槽="footer-links-docs"*
We first **body = [Compute body](文件.读文本(路径="components/footer/links/docs/content.md"))** for the next step.
After these steps, return *组件.正文(文本=`body`, 槽="footer-links-docs")*.
@@ -17,7 +17,7 @@ import:
若子块仍含独立分栏,就继续沿对应目录的 index.mq.md 分解。
不要把渲染后的字符串放回值列,子节点在整个装配过程中保持结构。
**docs_nodes = > docs.节点**
**community_nodes = > community.节点**
**siblings = 组件.合并 甲=`docs_nodes` 乙=`community_nodes`**
*> 布局.分栏 子节点=`siblings` 槽="footer-links"*
We first **docs_nodes = [Compute docs_nodes](docs.节点())** for the next step.
We first **community_nodes = [Compute community_nodes](community.节点())** for the next step.
We first **siblings = [Compute siblings](组件.合并(甲=`docs_nodes`, 乙=`community_nodes`))** for the next step.
After these steps, return *布局.分栏(子节点=`siblings`, 槽="footer-links")*.
@@ -18,9 +18,9 @@ import:
若子块仍含独立分栏,就继续沿对应目录的 index.mq.md 分解。
不要把渲染后的字符串放回值列,子节点在整个装配过程中保持结构。
**nav_nodes = > nav.节点**
**content_nodes = > content.节点**
**footer_nodes = > footer.节点**
**upper_regions = 组件.合并 甲=`nav_nodes` 乙=`content_nodes`**
**home_regions = 组件.合并 甲=`upper_regions` 乙=`footer_nodes`**
*> 布局.纵排 子节点=`home_regions` 槽="home"*
We first **nav_nodes = [Compute nav_nodes](nav.节点())** for the next step.
We first **content_nodes = [Compute content_nodes](content.节点())** for the next step.
We first **footer_nodes = [Compute footer_nodes](footer.节点())** for the next step.
We first **upper_regions = [Compute upper_regions](组件.合并(甲=`nav_nodes`, 乙=`content_nodes`))** for the next step.
We first **home_regions = [Compute home_regions](组件.合并(甲=`upper_regions`, 乙=`footer_nodes`))** for the next step.
After these steps, return *布局.纵排(子节点=`home_regions`, 槽="home")*.
@@ -14,5 +14,5 @@ import:
此叶子只负责main 的 Markdown 内容,父组件决定排列。修改文字只改相邻 content.md,
不添加 HTML 标签或内部分栏;出现第二种布局职责时再开子目录。
**body = 文件.读文本 路径="components/main/content.md"**
*> 组件.正文 文本=`body` 槽="main"*
We first **body = [Compute body](文件.读文本(路径="components/main/content.md"))** for the next step.
After these steps, return *组件.正文(文本=`body`, 槽="main")*.
@@ -14,5 +14,5 @@ import:
此叶子只负责nav 的 Markdown 内容,父组件决定排列。修改文字只改相邻 content.md,
不添加 HTML 标签或内部分栏;出现第二种布局职责时再开子目录。
**body = 文件.读文本 路径="components/nav/content.md"**
*> 组件.正文 文本=`body` 槽="nav"*
We first **body = [Compute body](文件.读文本(路径="components/nav/content.md"))** for the next step.
After these steps, return *组件.正文(文本=`body`, 槽="nav")*.
+5 -1
View File
@@ -10,7 +10,11 @@ import:
# main
| 返回 | 类型 | 说明 |
|---|---|---|
| result | any | The value explicitly returned below; conditional returns follow the selected branch |
页面只选择布局根,具体拆分沿 components/index.mq.md 继续。
此主程序返回结构而不是 HTML;view 元数据让服务在启动时执行它。
*> home.节点*
After these steps, return *home.节点()*.
@@ -7,4 +7,5 @@ markup: occlusion
# 关于
这是普通 Markdown Document,不执行布局函数。
+12 -4
View File
@@ -1,12 +1,20 @@
---
markup: occlusion
title: 可直接调用的布局预览
import:
home: ./components/index.mq.md
网页: ext/web/网页.mq.md
---
# main
预览从站点组件根开始,不拼接另一份页面。
**nodes = > home.节点**
**html = 网页.渲染 节点=`nodes` 标题="Marqdo 布局实践"**
> 打印 内容=`html`
## main
| 返回 | 类型 | 说明 |
|---|---|---|
| result | text | 与原有运行输出一致的 HTML 文本 |
本函数既可以用 marqdo call 直接取得 HTML 返回值,也保留 marqdo run 原有的预览输出。组件内容相对站点根目录读取,因此从仓库根调用时应将 --fs-root 指向 examples/web-layout-handbook-zh,并授予 fs.read、plugin 和 output.write。预览不会开启网络监听,也不修改内容文件;线上服务与本函数共享节点渲染器,页脚左右区域和嵌套链接列应保持一致。检查返回的 HTML 不能代替浏览器中的布局和交互验证。
我们 **nodes = [沿组件入口装配全部布局](home.节点())**,再 **html = [使用线上相同的节点渲染器](网页.渲染(节点=`nodes`, 标题="Marqdo 布局实践"))**。
我们 **[为原有运行预览输出页面](打印(内容=`html`))**,随后直接返回 *html*。
+10 -2
View File
@@ -6,7 +6,15 @@ import:
# main
| 参数 | 类型 | 默认 | 说明 |
|---|---|---|---|
| 端口 | any | 18081 | 本地 HTTP 监听端口;服务启动后持续运行直到调用方停止 |
| 返回 | 类型 | 说明 |
|---|---|---|
| result | any | None; execute this page's documented steps in order and observe their output or stated effects |
端口 `端口`=18081 可通过 --bind 覆盖。启动器不包含页面布局。
**监听端口 = 整数 值=`端口`**
> 网页.服务 根="." 主机="127.0.0.1" 端口=`监听端口`
We first **监听端口 = [Compute 监听端口](整数(值=`端口`))** for the next step.
We now **[Call 网页.服务](> 网页.服务 根="." 主机="127.0.0.1" 端口=`监听端口`)**.