Syntax
folio is extended markdown — every bit of plain markdown still works, plus two structural primitives: command blocks ::: and named data blocks @.
Command blocks
A triple-colon fence whose first line begins with /command-name:
::: /插入图表 引用@销售
Bar chart, X = quarter, Y = sales
Highlight Q4
:::
Inside the fence:
- First line:
/command [args...] 引用@xxx: a special argument referencing a data block.xxxmust not contain spaces.- A single command can take multiple
引用@arguments. - Subsequent lines: natural-language body.
Named data blocks
A block that starts with @name and can be referenced by 引用@:
Resolution order:
- Look for a
@xxxof the same name in the same file. - If not found, look for
xxx.csv/xxx.json/xxx.mdin the same directory. - If still not found, error out.
Five built-in commands
/插入表格 (insert-table)
| Quarter | Sales |
|---|---|
| Q1 | 100 |
| Q2 | 120 |
| Q3 | 140 |
| Q4 | 180 |
No LLM call — pure data → HTML table.
/插入图表 (insert-chart)
No chat provider configured for lib-mode build
LLM turns description + data → Vega-Lite spec → interactive in-browser rendering.
/插入流程图 (insert-flowchart)
No chat provider configured for lib-mode build
LLM emits Mermaid code → rendered in the browser.
/插入插图 (insert-illustration)
插图错误(行 74)
图像 API 失败: No image provider configured for lib-mode build
图像 API 失败: No image provider configured for lib-mode build
Calls an image API (Zhipu CogView / Gemini Imagen / OpenAI gpt-image-1) and produces PNG/JPEG.
/插入交互 (insert-interactive)
No chat provider configured for lib-mode build
LLM picks one of 4 built-in widgets (filterable-table / tabs / slider-calc / accordion), fills in its config → rendered in the browser.