fix: incorrect image & menu path for site hosted in subdir (#168)
This commit is contained in:
parent
9befda7310
commit
3e8490da1d
@ -26,5 +26,5 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</figure>
|
</figure>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} />
|
<img src="{{ .Destination | relURL | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} />
|
||||||
{{- end -}}
|
{{- end -}}
|
@ -23,7 +23,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<!-- Can not find the image under page bundle. Could be a relative linked image -->
|
<!-- 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 }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<!-- External image -->
|
<!-- External image -->
|
||||||
{{ $result = merge $result (dict "permalink" $defaultImageSetting.src) }}
|
{{ $result = merge $result (dict "permalink" (relURL $defaultImageSetting.src)) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
{{ $active := or (eq $currentPage.Title .Name) (or ($currentPage.HasMenuCurrent "main" .) ($currentPage.IsMenuCurrent "main" .)) }}
|
||||||
|
|
||||||
<li {{ if $active }} class='current' {{ end }}>
|
<li {{ if $active }} class='current' {{ end }}>
|
||||||
<a href='{{ .URL | relURL }}'>
|
<a href='{{ .URL }}'>
|
||||||
{{ if .Pre }}
|
{{ if .Pre }}
|
||||||
{{ partial "helper/icon" .Pre }}
|
{{ partial "helper/icon" .Pre }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user