mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-06-13 01:57:28 -05:00
Correctly replace the name for svgs
This commit is contained in:
@ -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 }}
|
||||
|
Reference in New Issue
Block a user