This guide explains how to render SVGs with the inline-svg partial. For all available arguments, see the partial reference page.

Examples

Required arguments only

{{- partial "inline-svg" (dict "page" . "src" "svgs/logos/thulite.svg") }}

All arguments

{{- $opts := dict
  "page" .
  "src" "svgs/logos/thulite.svg"
  "id" "logo-thulite"
  "class" "icon icon-brand"
  "role" "img"
  "title" "Thulite logo"
  "desc" "Wordmark and symbol for the Thulite project"
  "ariaLabelledby" "logo-title"
  "ariaDescribedby" "logo-desc"
  "width" "160"
  "height" "32"
  "stroke-width" "1.5"
}}
{{- partial "inline-svg.html" $opts }}