Markdown bodies
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.
CommonMark and GFM
Everything in CommonMark plus GitHub-Flavored Markdown, with one exception: a heading line in a body is refused, because a heading is a node's place and the renderer writes it from the node's title.
So bodies carry:
- 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
A short ref is a link written against a node's id, which the renderer rewrites into the wiki's own URL. It survives a title or slug change because the id does not move.
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 written as > [!KIND] blockquotes, in the GitHub admonition syntax.
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 the body as
.
No external hosts
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.
Without object storage there is no workaround
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 rather than reaching for an external host.