openapi: iterative programming at its best #804

This commit is contained in:
Sören Weber 2024-03-16 20:24:40 +01:00
parent d0cc34396d
commit 92a3375ae8
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -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 }}