fix(image): correct permalink handling for images placed in static folder (#1330)
* fix(image): correct permalink handling for images placed in `static` folder related: https://github.com/CaiJimmy/hugo-theme-stack/discussions/1307 * Remove urls.AbsURL
This commit is contained in:
@@ -14,12 +14,14 @@
|
||||
{{ if .Image }}
|
||||
{{ $url := urls.Parse .Image }}
|
||||
{{ $permalink := .Image }}
|
||||
{{ $resource := dict
|
||||
|
||||
{{ $result = dict
|
||||
"Resource" nil
|
||||
"Permalink" $permalink
|
||||
"Height" nil
|
||||
"Width" nil
|
||||
}}
|
||||
{{ $resource := dict }}
|
||||
{{ $local := true }}
|
||||
|
||||
{{ if not (in (slice "https" "http") $url.Scheme) }}
|
||||
|
||||
Reference in New Issue
Block a user