Code Blocks
Code Blocks

Reference for inline code and fenced code blocks in IOModel Markdown.

Code blocks keep technical examples readable and copy-paste friendly.

Inline code

Source syntax

Use `projectId` and `branch` query params for preview requests.

Rendered output

Use projectId and branch query params for preview requests.

Fenced code blocks

Source syntax

```bash
curl -H "Authorization: Bearer $TOKEN" \
  https://api.example.com/v1/projects/$PROJECT_ID
```

## Unsupported block styles

<Callout type="warning" title="Important compatibility rule">
In IOModel specs, the following code block styles are **not supported**:

- indented code blocks (each line prefixed with 4 spaces or 1 tab)
- code fences using triple tildes (`~~~`)

Use triple backticks (` ``` `) for fenced code blocks.
</Callout>

Rendered output

curl -H "Authorization: Bearer $TOKEN" \
  https://api.example.com/v1/projects/$PROJECT_ID

Language hints

Use a language tag after the opening fence so syntax highlighting works correctly:

  • bash for shell commands
  • yaml for model/config snippets
  • json for API payloads
  • ts/tsx for TypeScript examples
  • mdx for component usage snippets

Common pitfalls

  • Using indented code blocks (4 spaces / tab) instead of fenced backticks
  • Using ~~~ fences instead of triple backticks
  • Missing language hint, which reduces readability
  • Mixing command output and command input in one block without comments
  • Very long examples without focusing on the relevant lines

Last updated on