Skip to content

Markdown and GitLab

The rule the engine follows: the editor is GitLab, the site adapts to it. Where the site cannot match, the construct is declared unsupported rather than rendered differently. Audited against GitLab 15.5.

ConstructGitLabSiteVerdict
Headings, lists, tables with alignment, task lists, footnotes, ~~strike~~, autolinksidentical
Relative links page.md, ./page.md, page.md#anchorfile → file/page, /page#anchorrewritten to routes
README.mdfile/the front page
assets/x.pdffile/assets/x.pdfone assets/ folder per repository, mirrored into the site
Images with a relative pathrelative to the filerelative to the file, optimizedidentical; a broken image is broken on both sides, the build does not fail
Heading anchors#heading-text, Cyrillic kept, -1 for duplicatesthe sameidentical, except headings with & or " — do not link to those
Emoji :rocket:identical
Mermaid ```mermaidclient-sideclient-side, script only on pages with a diagramidentical
PlantUMLif the server has itrendered to SVG (knowledge bases only)do not use in landing pages
Code ```pythonidentical; a title="x.js" after the language is ignored by GitLab and drawn by the site
Math $`a^2`$, ```mathKaTeXSVG, no fontsidentical — the only math syntax
Math $a^2$, $$…$$literalliteralunsupported
Alerts > [!note], [!tip], [!important], [!warning], [!caution]a quote with the marker texta styled boxaccepted difference: GitLab ≥ 17.10 renders them natively, 15.5 degrades to a readable quote
Front mattershown as a yaml blockhiddenaccepted; knowledge bases need none
HTML <details>, <kbd>, <sup>, <sub>, <br>, <div align>identical
HTML <script>, <iframe>, style=, on*=, javascript:strippedstripped (in .md; .mdx is code, not content)identical
Definition lists, {attrs}, wiki links [[…]]literalliteralunsupported

In one sentence: write as you write in GitLab; the only non-GitLab thing the site adds is the alert box, and it degrades safely in GitLab itself.

How the pipeline achieves this — which plugins rewrite what — is on How it works.