danix
's git repository
home
/
my projects
/
theme-danix.xyz.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed svg display using shortcode and partial.
[theme-danix.xyz.git]
/
layouts
/
shortcodes
/
svg.html
diff --git
a/layouts/shortcodes/svg.html
b/layouts/shortcodes/svg.html
index
1575bc3
..
cdde6cc
100644
(file)
--- a/
layouts/shortcodes/svg.html
+++ b/
layouts/shortcodes/svg.html
@@
-1,4
+1,5
@@
-<pre class="inline-vg">
-{{ $favicon := resources.Get "SVGs/linux.svg" }}
-{{ $favicon | absURL | readFile | safeHTML }}
-</pre>
+<span class="inline-svg">
+{{- $fname := print "SVGs/" ( .Get 0 ) ".svg" -}}
+{{ $icon := resources.Get $fname }}
+{{ $icon.Content | safeHTML }}
+</span>