mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +00:00
openapi: iterative programming at its best #804
This commit is contained in:
parent
d0cc34396d
commit
92a3375ae8
1 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,8 @@
|
||||||
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
|
{{- $url := .RelPermalink }}
|
||||||
{{- $url = path.Clean $url }}
|
|
||||||
{{- $url = replaceRE "/[^/]*$" "" $url }}
|
{{- $url = replaceRE "/[^/]*$" "" $url }}
|
||||||
{{- $url = replaceRE "/[^/]*" "/.." $url }}
|
{{- $home_url := .Site.Home.RelPermalink }}
|
||||||
{{- $url = replaceRE "^/" "" $url }}
|
{{- $home_url = replaceRE "/[^/]*$" "" $home_url }}
|
||||||
{{- $url = replaceRE "/$" "" $url }}
|
{{- $rel_url := strings.TrimPrefix $home_url $url }}
|
||||||
{{- return $url }}
|
{{- $rel_url = replaceRE "/[^/]*" "/.." $rel_url }}
|
||||||
|
{{- $rel_url = trim $rel_url "/" }}
|
||||||
|
{{- return $rel_url }}
|
Loading…
Reference in a new issue