mirror of https://github.com/docker/docs.git
hugo: fix invalid image refs for section pages
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
72fc7e93fa
commit
d8750ca6e7
|
@ -2,7 +2,11 @@
|
|||
{{- $src := $u.String -}}
|
||||
{{ if not (or $u.IsAbs (strings.HasPrefix $u.String "/")) }}
|
||||
{{ $base := urls.Parse .Page.Permalink }}
|
||||
{{ $src = $base.JoinPath "../" $u.Path -}}
|
||||
{{ if eq .Page.Kind "section" }}
|
||||
{{ $src = $base.JoinPath $u.Path -}}
|
||||
{{ else }}
|
||||
{{ $src = $base.JoinPath "../" $u.Path -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $params := $u.Query }}
|
||||
|
|
Loading…
Reference in New Issue