mirror of
https://github.com/docker/docs.git
synced 2026-03-27 14:28:47 +07:00
fix: relative image references in leaf bundles
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{{- $src := $u.String -}}
|
||||
{{ if not (or $u.IsAbs (strings.HasPrefix $u.String "/")) }}
|
||||
{{ $base := urls.Parse .Page.Permalink }}
|
||||
{{ if eq .Page.Kind "section" }}
|
||||
{{ if strings.HasSuffix .Page.File.BaseFileName "index" }}
|
||||
{{ $src = $base.JoinPath $u.Path -}}
|
||||
{{ else }}
|
||||
{{ $src = $base.JoinPath "../" $u.Path -}}
|
||||
|
||||
Reference in New Issue
Block a user