mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Correctly replace the name for svgs
This commit is contained in:
parent
7f3d3f3dca
commit
9bb2b0c41c
@ -1,5 +1,5 @@
|
||||
{{ $icon_resource := resources.Get (printf "feather/icons/%s.svg" .) }}
|
||||
{{ $icon := $icon_resource.Content }}
|
||||
{{ $icon = replaceRE `<svg` `<svg class="icon"` $icon }}
|
||||
{{ $icon = replaceRE `</svg>` `<title>{{ . }} icon</title></svg>` $icon }}
|
||||
{{ $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon }}
|
||||
{{ $icon | safeHTML }}
|
||||
|
Loading…
Reference in New Issue
Block a user