diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index e13896a..fbaba27 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -26,5 +26,5 @@ {{ end }} </figure> {{- else -}} - <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} /> + <img src="{{ .Destination | relURL | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} /> {{- end -}} \ No newline at end of file diff --git a/layouts/partials/helper/image.html b/layouts/partials/helper/image.html index 8791aa7..dd86d27 100644 --- a/layouts/partials/helper/image.html +++ b/layouts/partials/helper/image.html @@ -23,7 +23,7 @@ {{ end }} {{ else }} <!-- Can not find the image under page bundle. Could be a relative linked image --> - {{ $result = merge $result (dict "permalink" $imageValue) }} + {{ $result = merge $result (dict "permalink" (relURL $imageValue)) }} {{ end }} {{ end }} @@ -51,7 +51,7 @@ {{ else }} <!-- External image --> - {{ $result = merge $result (dict "permalink" $defaultImageSetting.src) }} + {{ $result = merge $result (dict "permalink" (relURL $defaultImageSetting.src)) }} {{ end }} {{ end }} diff --git a/layouts/partials/sidebar/left.html b/layouts/partials/sidebar/left.html index 14f195e..c7158bb 100644 --- a/layouts/partials/sidebar/left.html +++ b/layouts/partials/sidebar/left.html @@ -37,7 +37,7 @@ {{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }} <li {{ if $active }} class='current' {{ end }}> - <a href='{{ .URL | relURL }}'> + <a href='{{ .URL }}'> {{ if .Pre }} {{ partial "helper/icon" .Pre }} {{ end }}