Guide

Output modes

Control whether comark-etiket emits inline SVG, an img with SVG data URI, or PNG at parse time.

Control the generated node type with the output= attr or a frontmatter default.

Use inline SVG (default)

ModeGenerated nodeNotes
svg (default)inline <svg>Supports CSS currentColor theming
svg.md
::qrcode{value="https://example.com" output="svg"}
::

Emit an img with SVG data URI

ModeGenerated nodeNotes
img<img src="data:image/svg+xml;…">Portable single element
img.md
::barcode{value="4006381333931" type="ean13" output="img"}
::

Emit PNG as a data URI

ModeGenerated nodeNotes
png<img src="data:image/png;base64,…">Not available for jabcode
png.md
::qrcode{value="https://example.com" output="png"}
::

Set a document-wide default

frontmatter.md
---
etiket:
  output: svg
---

Per-directive attrs always override frontmatter and plugin defaults.

Copyright © 2026