Skip to content

Commit 1fb10e2

Browse files
committed
Fix image shortcode
1 parent 66df83c commit 1fb10e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

layouts/shortcodes/image.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ $fname := .Get "filename" }}
1+
{{ $fname := .Get "filename" | strings.TrimLeft "/" }}
22
{{ if not (hasPrefix $fname "/") }}
33
{{ .Scratch.Set "file" (printf "/%s" $fname) }}
44
{{ else }}

0 commit comments

Comments
 (0)