Skip to content
OwnDocs
Feature

Code & diagrams

Syntax highlighting across 71 languages, plus Mermaid diagrams drawn from a fenced code block and sanitized before display.

  • Code blocks are highlighted across 71 languages, and a code group tabs the same snippet across several of them.
  • Fence metadata carries a filename, a highlighted line range, line numbers, and a cap on how many lines show before the block expands.
  • Mermaid diagrams come straight from a fenced code block. They render in the browser after hydration, and DOMPurify sanitizes the SVG before it reaches the page.
  • A wide diagram scrolls inside its own container, which takes keyboard focus, rather than shrinking past the point where its labels stay readable.

Our documentation site is built with OwnDocs, running the same code you receive.