Add bilingual public docs, keyword aliases, and frontmatter stdin for view.

English/Chinese user pages sit side by side; L0 builtins and lib/ text|表 dual APIs land with gold coverage. Capture/view input demos use stdin:/输入: so static export and first page load succeed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-08-05 09:14:26 +08:00
1 parent fd36b92224
commit a5d30c00b3
68 files changed
+1812 -241

No files matched your search

+3 -3
View File
@@ -1,12 +1,12 @@
---
title: Hello World
description: 最简单的可执行文档
description: Smallest runnable doc
---
# main
普通段落是注释。print 是内置函数,不是语法架构。
Ordinary paragraphs are comments. `print` is a built-in, not a syntax marker.
注释里的粗体与斜体标记若出现在行首会被当成代码,所以叙述行请用普通文字开头。
Lines that start with Markdown emphasis markers can be treated as code — keep narrative as plain prose.
> print text=Hello World!
+12
View File
@@ -0,0 +1,12 @@
---
title: 你好世界
description: 最小可运行文档
---
# main
普通段落是注释。`打印` 是内置函数,不是语法标记。
以 Markdown 强调标记开头的行可当作代码——叙述请用普通段落。
> 打印 内容=你好世界!
+8 -8
View File
@@ -1,17 +1,17 @@
---
title: 函数与具名调用
description: `#` 定义函数,`>` 调用;`-` 下列纯名为形参
title: Functions and named calls
description: `#` defines functions; `>` calls; `-` lists parameter names
---
# main
用 `#` / `##` 定义函数。形参写在函数头下方的 `-` 纯名行。
Use `#` / `##` for functions. Parameters are bare `- name` lines under the heading.
调用用 `>`:具名实参写作 `形参=值`。
Call with `>` and named args `param=value`:
> 问候 谁=World
> greet who=World
## 问候
- 谁
## greet
- who
> print text=Hello `谁`!
> print text=Hello `who`!
+17
View File
@@ -0,0 +1,17 @@
---
title: 函数与具名调用
description: `#` 定义函数;`>` 调用;`-` 列出参数名
---
# main
用 `#` / `##` 定义函数。参数是标题下的裸 `- 名` 行。
用 `>` 与具名实参 `参数=值` 调用:
> 问候 谁=世界
## 问候
- 谁
> 打印 内容=你好 `谁`!
+9 -9
View File
@@ -1,19 +1,19 @@
---
title: 位置实参
description: 按形参顺序传参;也可继续用具名
title: Positional arguments
description: Bind by parameter order; named form still works
---
# main
位置实参:按形参声明顺序绑定,不必写 `谁=`。
Positional args bind in declaration order (no `who=` needed):
> 问候 Marqdo
> greet Marqdo
具名形式仍然可用:
Named form still works:
> 问候 谁=World
> greet who=World
## 问候
- 谁
## greet
- who
> print text=Hello `谁`!
> print text=Hello `who`!
+19
View File
@@ -0,0 +1,19 @@
---
title: 位置实参
description: 按参数声明顺序绑定;具名写法仍然可用
---
# main
位置实参按声明顺序绑定(不必写 `谁=`):
> 问候 Marqdo
具名写法仍然可用:
> 问候 谁=世界
## 问候
- 谁
> 打印 内容=你好 `谁`!
+6 -6
View File
@@ -1,17 +1,17 @@
---
title: 分支
description: `+` 臂;整行 `*` 为 else
title: Branch
description: `+` arms; a lone `*` arm is else
---
# main
斜体行是程序语句。分支用 `+`;臂头单独一行 `*` 表示 else。
Italic lines are statements. Branches use `+`; a head that is only `*` is the else arm.
*`x` = 0*
+ `x` > 0
> print text=正数
> print text=positive
+ `x` < 0
> print text=负数
> print text=negative
+ *
> print text=零
> print text=zero
+17
View File
@@ -0,0 +1,17 @@
---
title: 分支
description: `+` 各臂;单独的 `*` 臂为否则
---
# main
斜体行是语句。分支用 `+`;表头仅为 `*` 的是否则臂。
*`x` = 0*
+ `x` > 0
> 打印 内容=正数
+ `x` < 0
> 打印 内容=负数
+ *
> 打印 内容=零
+12 -12
View File
@@ -1,13 +1,13 @@
---
title: 循环
description: 条件循环与表格遍历
title: Loops
description: Condition loops and table walks
---
# main
函数体内的 `-` 是循环(不是形参)。
Inside a function body, `-` starts a loop (not a parameter).
倒数:
Countdown:
*`n` = 3*
@@ -15,14 +15,14 @@ description: 条件循环与表格遍历
> print text=`n`
*`n` = `n` - 1*
遍历篮子(表格是集合):
Walk a table (tables are collections):
`篮子` =
`basket` =
| 果 |
|----|
| 苹果 |
| 梨 |
| fruit |
|-------|
| apple |
| pear |
- [果](篮子)
> print text=今天吃`果`
- [fruit](basket)
> print text=today `fruit`
+28
View File
@@ -0,0 +1,28 @@
---
title: 循环
description: 条件循环与表遍历
---
# main
在函数体里,`-` 表示循环(不是参数)。
倒数:
*`n` = 3*
- `n` > 0
> 打印 内容=`n`
*`n` = `n` - 1*
遍历表(表即集合):
`篮子` =
| 水果 |
|------|
| 苹果 |
| 梨 |
- [水果](篮子)
> 打印 内容=今天 `水果`
+11 -11
View File
@@ -1,19 +1,19 @@
---
title: 集合(表格)
description: GFM 表格即集合
title: Collections (tables)
description: GFM tables are collections
---
# main
Markdown 表格在 Marqdo 里就是集合,可用循环逐行取出。
A Markdown table is a collection; loop to read each row.
`篮子` =
`basket` =
| 果 |
|----|
| 苹果 |
| 梨 |
| 桃 |
| fruit |
|-------|
| apple |
| pear |
| peach |
- [果](篮子)
> print text=`果`
- [fruit](basket)
> print text=`fruit`
+19
View File
@@ -0,0 +1,19 @@
---
title: 集合(表)
description: GFM 表格即集合
---
# main
Markdown 表是集合;用循环读每一行。
`篮子` =
| 水果 |
|------|
| 苹果 |
| 梨 |
| 桃 |
- [水果](篮子)
> 打印 内容=`水果`
+6 -6
View File
@@ -1,17 +1,17 @@
---
title: 跨文件导入
description: frontmatter 中 `> 文件.mq.md` 导入模块
title: Cross-file import
description: Frontmatter `> file.mq.md` merges modules
> utils.mq.md
---
# main
文件头 YAML 里写 `> utils.mq.md` 即可导入同目录模块。
In the YAML header, `> utils.mq.md` imports a sibling module.
导入后:用返回值绑定,再输出;并直接调用问候。
Bind a return value, print it, then call greet:
*`y` = > 加一 n=41*
*`y` = > add_one n=41*
> print text=`y`
> 问候 谁=Marqdo
> greet who=Marqdo
+6 -6
View File
@@ -1,14 +1,14 @@
---
title: 工具模块
description: 被 main 导入;粗体是返回值
title: Utility module
description: Imported by main; bold is a return value
---
# 加一
# add_one
- n
**`n` + 1**
# 问候
- 谁
# greet
- who
> print text=你好,`谁`!
> print text=Hello, `who`!
+17
View File
@@ -0,0 +1,17 @@
---
title: 跨文件导入
description: frontmatter 中 `> 文件.mq.md` 合并模块
> 工具.mq.md
---
# main
在 YAML 头里写 `> 工具.mq.md` 可导入同级模块。
绑定返回值、打印,再调用问候:
*`y` = > 加一 n=41*
> 打印 内容=`y`
> 问候 谁=Marqdo
+14
View File
@@ -0,0 +1,14 @@
---
title: 工具模块
description: 被 main 导入;粗体为返回值
---
# 加一
- n
**`n` + 1**
# 问候
- 谁
> 打印 内容=你好,`谁`!