--- name: siyuan-markup-guide description: CLI-only SiYuan markup guide for rich Markdown written through siyuan-sisyphus. Use for headings, lists, tasks, tables, code, math, diagrams, tags, callouts, super blocks, embeds, and block references. --- # SiYuan Markup Guide with the CLI Pass rich content as Markdown to block or document write actions. Keep each write bounded and read the result after insertion. ```bash siyuan-sisyphus block append --parent-id '' --data-type 'markdown' --data '## Heading Paragraph with **bold** text.' --json ``` ## Common markup ```markdown # Heading **bold**, *italic*, ~~deleted~~, ==highlight==, `inline code`, #tag# - Item - Nested item - [ ] Task | Name | Status | | --- | --- | | Draft | Done | > **Note** > > Keep evidence with the decision. ``` Use an attribute view for real database behavior rather than a Markdown table. ## Math and diagrams ```markdown Inline: $e^{i\pi}+1=0$ $$ \int_0^1 x^2 dx = \frac{1}{3} $$ ``` ````markdown ```mermaid flowchart TD A[Start] --> B[Done] ``` ```` ## SiYuan-specific forms - Block reference: `(( "Optional label"))` - Embed query: `{{SELECT id, content FROM blocks WHERE content LIKE '%TODO%' LIMIT 20}}` - Horizontal super block: wrap sibling blocks in `{{{row` and `}}}`. - Vertical super block: wrap sibling blocks in `{{{col` and `}}}`. - IAL attributes: `{: custom-key="value"}`; use dedicated attribute actions for programmatic metadata. Do not invent unsupported Markdown extensions. For detailed layout rules or unfamiliar write fields, inspect `siyuan-sisyphus help block append` before writing.