mirror of https://github.com/docker/docs.git
fix: relative image references in leaf bundles
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
c8d77aeb2e
commit
ef0d03ff26
|
@ -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 -}}
|
||||
|
|
Loading…
Reference in New Issue