mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
search: fix result links for pages in root #810
This commit is contained in:
parent
5b8367085f
commit
69c71369fa
1 changed files with 3 additions and 0 deletions
|
@ -4,4 +4,7 @@
|
||||||
{{- $rel_url := strings.TrimPrefix $subdir $url }}
|
{{- $rel_url := strings.TrimPrefix $subdir $url }}
|
||||||
{{- $rel_url = replaceRE "/[^/]*" "/.." $rel_url }}
|
{{- $rel_url = replaceRE "/[^/]*" "/.." $rel_url }}
|
||||||
{{- $rel_url = trim $rel_url "/" }}
|
{{- $rel_url = trim $rel_url "/" }}
|
||||||
|
{{- if not $rel_url }}
|
||||||
|
{{- $rel_url = "." }}
|
||||||
|
{{- end }}
|
||||||
{{- return $rel_url }}
|
{{- return $rel_url }}
|
Loading…
Reference in a new issue