feat(content): support complete local resource references (#388)
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
{{- with .class -}}
|
||||
{{- with .Class -}}
|
||||
<i class="{{ . }}"></i>
|
||||
{{- else -}}
|
||||
{{- $src := .src -}}
|
||||
{{- with .simpleicons -}}
|
||||
{{- $prefix := "lib/simple-icons/icons" -}}
|
||||
{{- with $.prefix -}}
|
||||
{{- $prefix = . -}}
|
||||
{{- end -}}
|
||||
{{- $prefix = $prefix | strings.TrimSuffix "/" -}}
|
||||
{{- $src := .Src -}}
|
||||
{{- with .Simpleicons -}}
|
||||
{{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}}
|
||||
{{- $src = printf "%v/%v.svg" $prefix . -}}
|
||||
{{- end -}}
|
||||
{{- if (urls.Parse $src).Host | not -}}
|
||||
|
||||
Reference in New Issue
Block a user