fix: disable svg image processing (#144)

* fix: disable svg image processing

closes https://github.com/CaiJimmy/hugo-theme-stack/issues/132

* style: remove extra blank space
This commit is contained in:
Jimmy Cai
2021-02-13 12:57:19 +01:00
committed by GitHub
parent 79d8c1db38
commit 79412144d9
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
{{- if $image -}}
{{- if and $image (ne (path.Ext .Destination) ".svg") -}}
{{- $alt := .PlainText | safeHTML -}}
<figure style="flex-grow: {{ div (mul $image.Width 100) $image.Height }}; flex-basis: {{ div (mul $image.Width 240) $image.Height }}px">
<a href="{{ $image.RelPermalink }}" data-size="{{ $image.Width }}x{{ $image.Height }}">