diff --git a/layouts/index.html b/layouts/index.html
index c86585d..5f5a37a 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -28,10 +28,12 @@
href="{{ $href }}"
target="_blank"
rel="me noopener noreferrer"
- >
- {{ partial "icon.html" $icon }}{{ $text | emojify }}
-
+ {{- with $icon -}}
+ {{ partial "icon.html" . }}
+ {{- end -}}
+ {{ $text | emojify }}
+
{{ end }}
{{ end }}
diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html
index cde57b9..831697a 100644
--- a/layouts/partials/icon.html
+++ b/layouts/partials/icon.html
@@ -1,6 +1,6 @@
-
- {{ $icon := resources.Get (print "icons/" . ".svg") }}
- {{ if $icon }}
+{{ $icon := resources.Get (print "icons/" . ".svg") }}
+{{ if $icon }}
+
{{ $icon.Content | safeHTML }}
- {{ end }}
-
+
+{{ end }}