Skip to content

Commit

Permalink
Allow adding SVG in place of logo image (adityatelange#976)
Browse files Browse the repository at this point in the history
Usage =>
Params.label.iconSVG: "<your SVG as a string>"
  • Loading branch information
icy-comet authored and dunklecat committed Oct 9, 2022
1 parent 6beb68f commit f17764f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
<img src="{{ $img.Permalink }}" alt="" aria-label="logo"
height="{{- site.Params.logo.iconHeight | default "30" -}}" width="{{- site.Params.logo.iconWidth | default "30" -}}">
{{- end -}}
{{- else if hasPrefix site.Params.label.iconSVG "<svg" }}
{{ site.Params.label.iconSVG | safeHTML }}
{{- end -}}
{{- $label_text -}}
</a>
Expand Down

0 comments on commit f17764f

Please sign in to comment.