Links and Media
Use double brackets for wiki links, external links, anchors, and File media.
[[target]]
[[target | display]]
[[#style="..." || target | display]]End the optional parameter prefix with ||. Without it, the parser treats the bracket body as target text.
After the optional prefix, the first unescaped | separates the target from display content. In a wiki target, the last unescaped # starts the anchor. Escaped separators remain part of the target text.
Link Targets
Wiki Pages
Bare titles identify root documents in the Document namespace:
[[HomePage]]
[[API Reference | API documentation]]
[[Tutorial | Getting started guide]]Use document: to state that root namespace explicitly:
[[document:Guide | Guide page]]Use id:UUID for stable identity, or name:namespace:parent:title for an exact named scope:
[[id:019a0000-0000-7000-8000-000000000001 | Guide]]
[[name:document:019a0000-0000-7000-8000-000000000002:Guide]]Different parents can contain the same local title. A malformed or unavailable UUID does not fall back to a title lookup. See document references for scope and escaping rules.
Anchors
Append #anchor to a document target. To link within the current document, start the target with #.
Anchor names stay logical in source. Public named-anchor URLs use sm-a- followed by lowercase hexadecimal UTF-8 bytes. For example, installation publishes #sm-a-696e7374616c6c6174696f6e. A copied canonical fragment also works in a wiki link. Generated section fragments use #s-1.2. Anchor definitions cannot use sm- names or generated section IDs. The first definition of a name wins; repeated definitions do not emit duplicate IDs. Preview and message bodies use instance IDs automatically. External URL fragments keep their authored value.
[anchor(installation)]
## Installation
[[Guide#installation | Jump to installation]]
[[#installation | Jump within this page]]If a literal # belongs in the title, escape it:
[[C\# Guide | C# Guide]]If several unescaped hashes appear in the target, the last one starts the anchor:
[[Guide#install#linux | Linux install anchor]]Category, User and Site Pages
category:, user: and site: are wiki namespaces:
[[category:Programming Languages | Category page]]
[[user:Alice | Alice's page]]
[[site:Policy | Site policy]]site is a fixed lowercase token. The host's translated display name is not a source prefix. A literal Document title site:Policy uses [[document:site:Policy]] or [[site\:Policy]].
External URLs
Targets that start with http:// or https:// are external links. Other schemes are not rendered as external URLs.
[[https://example.com]]
[[https://rust-lang.org | Official Rust website]]
[[https://github.com/rust-lang/rust | Rust GitHub repository]]Without display text, an external link displays its URL. An allowed wiki link displays the current local title supplied by the host.
Missing and unreadable wiki links have the same unresolved display. They keep authored display content, or the authored local title or UUID when no display content is given. They do not show private resolved titles or paths. The host can add a normal name lookup route for an unresolved named link. That route keeps the authored namespace and parent scope and rechecks read access. The display does not disclose whether the target exists or grant link-preview, File, or include access.
File Description Links
Use a leading colon to link to a File description without embedding its image:
[[:file:image.png | Image description]]
[[:file:image.png#credits | Credits]]These targets become LinkElement nodes with named File references. The host supplies an explicit access decision. The HTTP renderer emits a destination only for allowed targets. Missing and unreadable targets keep the same authored-only unresolved display described above. An optional host name lookup can make that label navigable, but supplies no resolved UUID or image hydration identity. The destination rechecks current read access.
Escape the prefix colon when it belongs to a literal Document title:
[[\:file:image.png]]
[[file\:image.png]]File Media
Use file: to embed File media:
[[file:image.png | Alt text for image]]
[[file:screenshot.jpg | Application screenshot]]
[[file:id:019a0000-0000-7000-8000-000000000001 | Image by UUID]]The value after file: uses the shared document reference syntax. The host must resolve it to an actual File document. A different actual namespace makes the media occurrence unavailable. An ordinary allowed link to the same UUID can remain available.
Links become LinkElement nodes. File media becomes a MediaElement node.
The authored source identifies a File document. It does not contain a storage key, image transport URL, or resize operation. The HTTP renderer emits a scoped hydration placeholder only after the host supplies an explicit allowed File decision. An unavailable image keeps its authored dimensions and displays an icon with its authored alternative text or file title. Missing and unreadable targets have the same marker. A host callback can make it a lookup or upload link using only the authored reference. Image-load failures use the same marker and remove approved media/navigation identities.
The browser runtime calls the host's resolveMedia adapter with the approved UUID. The adapter rechecks current access and readiness. It returns a cookie-protected same-origin content URL and the actual available private variant URLs. Each variant URL must use the same region and File identity as the content URL and one of the supported w160, w320, w640, w960, w1280, w1920, w2560, or w4096 keys. The browser runtime rejects remote URLs, other route shapes, invalid dimensions, and duplicate actual widths. It emits a responsive srcset and updates sizes from the measured content width. Public CDN candidates already present in renderer HTML stay direct. The host owns storage access and image conversion. Raw storage URLs and credentials are outside this HTTP/runtime contract.
The host supplies source and candidate dimensions to reserve layout space. Authored #width, #height, #fit, styles, alignment, theme, and wrapper links control this occurrence. Display content after | is alternative text for the image. It does not change stored File metadata.
To add a caption, place ordinary text after the image. File media has no #caption parameter. Invalid presentation parameters produce diagnostics. They do not grant access to a File.
NamuMark File Syntax Sugar
The alias [[:파일:image.png|Image description]] formats as [[:file:image.png | Image description]]. It creates a File description link with the same host access rules.
The parser maps NamuMark file brackets to the same canonical MediaElement:
[[파일:image.png]]
[[파일:image.png|width=120&height=80&object-fit=cover]]
[[파일:#1f1e33.jpg#|width=100]]
[[Page|[[파일:logo.png|width=25]]]]On 파일: media, the section after | contains image parameters separated by &. Valid key=value entries become canonical SevenMark parameters. Unitless width and height values become pixels. object-fit becomes fit.
A title that starts with # can use a trailing # to mark the end of the title. The parser removes that trailing marker from the stored File title.
width=120&height=80&object-fit=cover
→ #width="120px" #height="80px" #fit="cover"Linked Files
In the HTTP/runtime flow, allowed File media links to its File document by default. To change that destination, keep the file: source and add a link parameter:
[[#url="https://example.com" || file:logo.png | Logo]]
[[#link="name:document:root:Guide" || file:guide-cover.png | Guide cover]]
[[#link="name:category:root:Rust" || file:rust-logo.png | Rust category]]
[[#link="name:user:root:Alice" || file:avatar.png | Alice]]#link accepts the shared document reference syntax, including id:UUID. Use #link for all document namespaces. The renderer selects a valid #url before #link:
#url > #linkIf an explicit #link destination is unavailable, the allowed image remains without that link. An invalid explicit destination does not restore the default File link.
Add #anchor to append a fragment to the selected media link:
[[#link="name:document:root:Guide" #anchor="installation" || file:guide-cover.png | Installation]]These parameters control media wrapper links. On a normal link such as [[#url="https://a.example" || Guide | Label]], the target remains Guide. #url does not replace a normal link target.
Theme-aware Files
Use #theme="light" or #theme="dark" to mark the intended theme. The renderer adds the matching data-theme value to the wrapper. It ignores other values.
[[#theme="light" || file:logo-light.svg | Light logo]]
[[#theme="dark" || file:logo-dark.svg | Dark logo]]The host chooses which wrapper to display for its current theme.
Parameters
Place parameters before the target and end the prefix with ||.
[[#style="float:right; width:180px" || file:sample.png | Example]]
[[#class="external-doc" || https://example.com/docs | Docs]]
[[#theme="dark" || file:logo-dark.svg | Dark logo]]Common renderer parameters include #style, #class, and #dark-*. For file: media, #theme="light" and #theme="dark" provide a dedicated theme hint.
The shared parameter specification defines these File media parameters:
| Parameter | Meaning |
|---|---|
#width | Display width; unitless numbers are pixels |
#height | Display height; unitless numbers are pixels |
#fit | contain, cover, fill, none, or scale-down |
#align | left, center, or right |
#style, #dark-style | Sanitized wrapper declarations |
#class | Additional wrapper classes |
#theme | light or dark visibility |
#url, #link, #anchor | Optional wrapper link |
The renderer and LSP report structured diagnostics for unknown, unsupported, non-canonical, or invalid parameters. These diagnostics do not remove an otherwise authorized image.
If the prefix does not contain ||, it is not a parameter prefix:
[[#style="color:red" Guide | The target includes the #style text]]Escape a bracket separator with a backslash. Use \|, \#, or \] to display that character as literal target or display text.
The parser does not create nested links inside display content. It permits media inside a link label, so an image can be the label of an ordinary native link.
Media and Links in Complex Structures
In Tables
{{{#table
[[#head [[Name]] [[Image]] [[Link]]]]
[[[[John]] [[[file:john.jpg | John's photo]]] [[[https://john.com | Profile]]]]]
}}}In Lists
{{{#list #type="numeric"
[[Profile images:]]
[[[[file:avatar1.png | User 1]]]]
[[[[file:avatar2.png | User 2]]]]
[[Documentation: [[https://docs.example.com | Official docs]]]]
}}}External Media Embeds
Provider embeds use parameters such as [[#youtube #id="..."]]. See External Media Embeds for YouTube, Spotify, Discord, and other providers.