Use Hugo resources system for feather-sprite.svg

This commit is contained in:
BBaoVanC 2021-10-06 09:41:38 -05:00
parent 0238423f1e
commit 919fcfe7cc
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
2 changed files with 2 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,3 +1,4 @@
{{ $sprites := resources.Get "icon/feather-sprite.svg" | fingerprint "sha256" }}
<svg class="icon" fill="none" stroke="lightgray" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<use href="{{ printf "/feather-sprite.svg#%s" . | relURL }}" />
<use href="{{ printf "%s#%s" $sprites.Permalink . | relURL }}" />
</svg>

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 272 B