diff options
author | Dillon <dillonzq@outlook.com> | 2020-05-28 12:05:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-28 12:05:37 +0300 |
commit | aa48df5eddf17e220e1f2cfd84538399a14249d2 (patch) | |
tree | f14ce1b94f856bd99b369bcd4064e925ff9cdc8e /layouts/shortcodes/version.html | |
parent | 0c1f7d0ef82636e0e699fa7799f4dd5497ed1322 (diff) |
feat(content): support complete local resource references (#388)
Diffstat (limited to 'layouts/shortcodes/version.html')
-rw-r--r-- | layouts/shortcodes/version.html | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/layouts/shortcodes/version.html b/layouts/shortcodes/version.html index 9f372d0..904be2d 100644 --- a/layouts/shortcodes/version.html +++ b/layouts/shortcodes/version.html @@ -5,9 +5,9 @@ {{- $color := cond (eq $type "changed") "ff9101" "00b1ff" | cond (eq $type "deleted") "ff5252" -}} {{- $pathTemplate := cond .Site.IsMultiLingual (printf "svg/version/%%v-%%v.%v.svg" .Page.Language.Lang) "svg/version/%v-%v.svg" -}} {{- $path := printf $pathTemplate $version $type -}} -{{- $res := resources.Get "svg/version.template.svg" -}} -{{- $res = $res | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}} +{{- $resource := resources.Get "svg/version.template.svg" -}} +{{- $resource = $resource | resources.ExecuteAsTemplate $path (dict "version" $version "label" $label "color" $color) | minify -}} {{- $alt := printf "LoveIt %v | %v" $label $version -}} <a href="{{ $url }}" rel="noopener noreffer" target="_blank"> - {{- dict "src" $res.RelPermalink "alt" $alt "class" "version" | partial "plugin/image.html" -}} + {{- dict "Src" $resource.RelPermalink "Alt" $alt "Class" "version" | partial "plugin/image.html" -}} </a>
\ No newline at end of file |