---
title: "Viewer Syntax Reference"
description: "Rendering conventions used by the static Toolbelt docs generator, so reviewers do not mistake intentional patterns for errors."
updated: 2026-11-12
---

# Viewer Syntax Reference

This page documents every syntax convention that the **static docs generator** (`scripts/generate-agent-docs.mjs` and related chrome in `scripts/docs-site.*`) applies on top of standard Markdown when building `apps/docs/`. These patterns are **intentional and correct** in the source files. Do not treat them as formatting errors during review.

The canonical content rules for writing new pages are in [FORMAT.md](https://docs.apexti.com/FORMAT.md). This file covers only the generate-time / site chrome rendering layer.

## SUMMARY.md nav icon comments

`docs/SUMMARY.md` uses HTML comments embedded in list items to attach sidebar icons to navigation entries. The generator reads these comments and renders an icon next to the nav label. They are invisible in GitHub's Markdown preview and have no effect on the document body.

**Pattern** (the `features/example-page.md` path is illustrative only — not a real doc):

```markdown
- [Page Title](https://docs.apexti.com/meta/features/example-page.md) <!-- nav:icon-name --> — Short description.
```

**Example from the live file:**

```markdown
- [Wrenches](https://docs.apexti.com/meta/features/wrenches.md) <!-- nav:wrench --> — Reusable MCP snippets your assistant runs.
```

**Rules:**

- The comment must appear on the same line as the list item, immediately after the link.
- The icon name must be a valid key from the table below.
- Do not remove or "fix" these comments. They are load-bearing for the sidebar UI.
- The `—` (em dash) and description text after the comment are optional human-readable annotations; the generator ignores them for the page body.

**Valid icon keys:**

| Key | Key | Key | Key |
|---|---|---|---|
| `book-open` | `bar-chart` | `key` | `shield` |
| `box` | `bar-chart-2` | `layers` | `shield-check` |
| `bell` | `brain` | `layout-dashboard` | `slack` |
| `bridge` | `briefcase` | `layout-grid` | `smartphone` |
| `building-2` | `calendar-clock` | `library` | `sparkles` |
| `chart-bar` | `circle-help` | `link` | `scroll-text` |
| `code` | `code-2` | `list-todo` | `search` |
| `coins` | `cpu` | `lock` | `server` |
| `credit-card` | `crown` | `mail` | `share-2` |
| `database` | `eye` | `message-square` | `sliders` |
| `file-text` | `folder` | `messages-square` | `tag` |
| `git-branch` | `globe` | `monitor` | `user` |
| `graduation-cap` | `plug` | `reply` | `users` |
| `radio-tower` | `refresh-cw` | `robot` | `users-round` |
| `rocket` | `rotate-ccw` | `variable` | `video` |
| `wrench` | `zap` | | | |

> **Note:** If an icon key is not in this table, the generator falls back to the `file-text` icon. If you need a new icon added, add the Lucide SVG path to `NAV_ICON_SVGS` in `scripts/docs-nav-icons.mjs` and update this table.

## Callout blockquotes

The generator converts blockquotes that open with a bold keyword into styled `.callout` panels.

**Supported keywords:** `Note:`, `Warning:`, `Tip:`

**Pattern:**

```markdown
> **Note:** Helpful context that is useful but not critical.
> **Warning:** Important risk, limitation, or destructive action.
> **Tip:** Practical advice that helps the user succeed.
```

In raw Markdown these are standard blockquotes. On the published HTML site they render as colored callout panels with an icon. Do not convert them to plain paragraphs.

See [FORMAT.md](https://docs.apexti.com/FORMAT.md) for the full callout authoring rules.

## Capability tile grids (:::cards)

The generator turns fenced blocks that begin with `:::cards` into a responsive card grid. On GitHub.com, these lines appear as plain unformatted text — that is expected.

**Pattern:**

```markdown
:::cards 3

===card
title: Card Title
icon: plug
href: features/some-page.md

Card body text as normal Markdown.

===card
title: Another Card
icon: wrench

No link on this one.

:::
```

**Keys per tile:**

| Key | Required | Description |
|---|---|---|
| `title` | Yes | Plain text label shown as the card heading. |
| `icon` | No | Any key from the valid icon table above, or a literal emoji. |
| `href` | No | Relative path to a doc page. Omit for a non-linking card. |

**What looks wrong but is correct:**

- `:::cards 3` — not a heading, not a code fence. Intentional generator directive.
- `===card` — not a setext heading underline. Intentional tile separator.
- `:::` on its own line — not a broken fence. Intentional grid closing tag.

## Code block language aliases

The site maps shorthand language identifiers to their canonical `highlight.js` equivalents before applying syntax highlighting. These aliases are valid in source files and will highlight correctly, even if a strict linter flags the shorthand as non-standard.

**Common aliases:**

| Alias in source | Resolved to |
|---|---|
| `ts` | `typescript` |
| `py` | `python` |
| `js` | `javascript` |
| `sh` | `bash` |
| `yml` | `yaml` |

Use whichever form is clearest for the author. Both work.

## URL deep-linking (?help= / ?topic=)

In-product help and shared links use stable IDs via `?help=<id>` (and legacy `?topic=`). The site entry (`apps/docs/index.html`) resolves those to canonical `.html` pages using `docs/topic-aliases.json`.

Examples:

```text
https://docs.apexti.com/?help=wrenches
https://docs.apexti.com/?help=boards-default-lanes
https://docs.apexti.com/?help=help-index
```

You may still see older `?topic=features/wrenches` links in support threads; the router accepts those too. Prefer `?help=` for new product links. Humans browsing the site should use `/<slug>.html` URLs directly.

## Sidebar labels

Sidebar labels come from the link text in `docs/SUMMARY.md` (not from the page H1). Keep SUMMARY titles clear and consistent; the static site does not rewrite casing.

## Collapsible sidebar sections

`##` headings in `SUMMARY.md` become collapsible sidebar groups. Opening a page expands its section; open/closed state is remembered in `localStorage`. While the sidebar filter has text, matching sections expand so results stay visible.

This is site chrome only — do not add collapse markup to `SUMMARY.md`.

## What to flag versus what to leave alone

| Pattern | Action |
|---|---|
| `<!-- nav:icon-name -->` in `SUMMARY.md` | **Leave alone.** Intentional. |
| `:::cards` / `===card` / `:::` fences | **Leave alone.** Intentional generator directive. |
| `> **Note:**` / `> **Warning:**` / `> **Tip:**` | **Leave alone.** Standard Markdown, styled on the HTML site. |
| Shorthand code fence languages (`ts`, `py`, `sh`) | **Leave alone.** Site resolves aliases. |
| Legacy JSX tags (`<Note>`, `<Card>`, `<Steps>`) in source | **Flag.** Deprecated artifacts; prefer the Markdown equivalents above. |
| `.mdx` links or imports | **Flag.** Link to `.md` files under `docs/` instead. |
| Missing `title` or `description` frontmatter | **Flag.** Required on every page. |
