fix: incorrect image & menu path for site hosted in subdir (#168)
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user