We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66df83c commit 1fb10e2Copy full SHA for 1fb10e2
layouts/shortcodes/image.html
@@ -1,4 +1,4 @@
1
-{{ $fname := .Get "filename" }}
+{{ $fname := .Get "filename" | strings.TrimLeft "/" }}
2
{{ if not (hasPrefix $fname "/") }}
3
{{ .Scratch.Set "file" (printf "/%s" $fname) }}
4
{{ else }}
0 commit comments