diff --git a/layouts/_partials/docs/links/portable-image.html b/layouts/_partials/docs/links/portable-image.html index 4b9bc44..a65f2b2 100644 --- a/layouts/_partials/docs/links/portable-image.html +++ b/layouts/_partials/docs/links/portable-image.html @@ -1,7 +1,7 @@ {{- $destination := .Destination -}} {{- $url := urls.Parse .Destination -}} -{{- $isRemote := gt (len $url.Host) 0 -}} +{{- $isRemote := $url.IsAbs -}} {{- $isFragment := strings.HasPrefix .Destination "#" -}} {{- if and (not $isRemote) (not $isFragment) -}} diff --git a/layouts/_partials/docs/links/portable-link.html b/layouts/_partials/docs/links/portable-link.html index 4c5c0c0..5a52ef3 100644 --- a/layouts/_partials/docs/links/portable-link.html +++ b/layouts/_partials/docs/links/portable-link.html @@ -1,7 +1,7 @@ {{- $destination := .Destination -}} {{- $url := urls.Parse .Destination -}} -{{- $isRemote := gt (len $url.Host) 0 -}} +{{- $isRemote := $url.IsAbs -}} {{- $isFragment := strings.HasPrefix .Destination "#" -}} {{- if and (not $isRemote) (not $isFragment) -}} diff --git a/layouts/_partials/docs/menu-hugo.html b/layouts/_partials/docs/menu-hugo.html index 76c5fd8..137653b 100644 --- a/layouts/_partials/docs/menu-hugo.html +++ b/layouts/_partials/docs/menu-hugo.html @@ -17,7 +17,7 @@ {{- $class = $class | append "active" -}} {{- end -}}