Skip to content

Commit

Permalink
openapi: iterative programming at its best #804
Browse files Browse the repository at this point in the history
  • Loading branch information
McShelby committed Mar 16, 2024
1 parent d0cc343 commit 92a3375
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions layouts/partials/toBaseRelURL.hugo
@@ -1,7 +1,8 @@
{{- $url := partial "relLangPrettyUglyURL.hugo" (dict "to" .) }}
{{- $url = path.Clean $url }}
{{- $url := .RelPermalink }}
{{- $url = replaceRE "/[^/]*$" "" $url }}
{{- $url = replaceRE "/[^/]*" "/.." $url }}
{{- $url = replaceRE "^/" "" $url }}
{{- $url = replaceRE "/$" "" $url }}
{{- return $url }}
{{- $home_url := .Site.Home.RelPermalink }}
{{- $home_url = replaceRE "/[^/]*$" "" $home_url }}
{{- $rel_url := strings.TrimPrefix $home_url $url }}
{{- $rel_url = replaceRE "/[^/]*" "/.." $rel_url }}
{{- $rel_url = trim $rel_url "/" }}
{{- return $rel_url }}

0 comments on commit 92a3375

Please sign in to comment.