Markdown is a widely-supported plain-text format that reads cleanly in any editor and renders consistently across tools. Wikilayer stores every node body as markdown, parses it with goldmark + GFM, and adds a few project-specific extensions for cross-linking and embedded callouts.
Standard
Everything in CommonMark plus GitHub-Flavored Markdown:
- Headings (
#through######).#is reserved for the heading the renderer generates from each node's title; bodies start at the next level down (see agent rules). - Bold (
**text**), italic (*text*), strikethrough (~~text~~). - Inline code (
`text`) and fenced code blocks with an optional language tag. - Unordered lists (
-,*,+), ordered lists (1.), nested lists by indentation. - Blockquotes (
>). - Tables (GFM pipe syntax).
- Task lists (
- [x],- [ ]). - Horizontal rules (
---). - Links (
[text](url)) and images ().
Wikilayer extensions
A few forms get rewritten during render.
Short refs
Two link shortcuts that rewrite to the wiki's stable internal URLs. Both survive title and slug changes since they resolve by id.
Page short refs
[text](page:N) resolves to the page's canonical /{owner}/{wiki}/{id}-{slug} URL. Slugs may rotate on rename; the id is stable.
Block short refs
[text](block:N) resolves to an in-page anchor #block-N on whichever page contains the block.
Admonitions
Visual callouts via fenced > [!KIND] blocks. Wikilayer uses the GitHub admonition syntax plus a custom kind for embedded maps.
Callouts
GitHub-flavored admonitions render as styled boxes. The first line of the blockquote names the kind:
> [!NOTE]
> Body text.
Supported kinds: NOTE, TIP, IMPORTANT, WARNING, CAUTION. Each gets its own colour and icon.
Map embeds
A [!MAP] admonition with lat, lng on the next line embeds an interactive map widget. A third line, if present, becomes the caption.
> [!MAP]
> 44.7866, 20.4489
> Belgrade, the city centre.
Local image embeds
Local photos and screenshots don't need an external host. The request_upload MCP tool issues a short-lived signed URL the agent posts raw bytes to. Flow:
- Call
request_upload(parent_id=<some node you can write to>, mime_type=<image/jpeg|png|webp|gif>). Returns{upload_url, ttl_seconds}. curl --data-binary @<file> -H 'Content-Type: <mime>' '<upload_url>'. The endpoint normalises to JPEG (longest side ≤1600 px), stores under/s/images/<wiki_id>/<hash>.jpg, and returns{url}.- Drop the returned URL into markdown as
.
Do not park photos on GitHub, Imgur, or any other external host before linking. The wiki owns its content; external links rot, get rate-limited, or expose the reader's IP. If request_upload doesn't appear in the tool list, object storage isn't configured on this deploy and image embedding isn't available. Ask the human, don't reach for a workaround.