]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
docs: use `urls.JoinPath` in more places (#39778)
authorXhmikosR <xhmikosr@gmail.com>
Fri, 22 Mar 2024 09:50:03 +0000 (11:50 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Mar 2024 09:50:03 +0000 (11:50 +0200)
site/content/docs/versions.md
site/layouts/partials/docs-sidebar.html

index c420de2a1a45ffb159f29be7b0ba1c7247ddcdf3..a61388391a077cd24aa857f8628f06bbfeac544b 100644 (file)
@@ -13,7 +13,7 @@ description: An appendix of hosted documentation for nearly every release of Boo
     {{- range $i, $version := $versions }}
       {{- $len := len $versions -}}
       {{ if (eq $i 0) }}<div class="list-group">{{ end }}
-        <a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version $.Site.Params.docs_version) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ $release.baseurl }}/{{ $version }}/">
+        <a class="list-group-item list-group-item-action py-2 text-primary{{ if (eq $version $.Site.Params.docs_version) }} d-flex justify-content-between align-items-center{{ end }}" href="{{ urls.JoinPath $release.baseurl $version "/" }}">
           {{ $version }}
           {{ if (eq $version $.Site.Params.docs_version) -}}
           <span class="badge text-bg-primary">Latest</span>
index 891a47306aaf6240aa9a8a01b8f59af0d8a92c18..51e7bac4fc8a40d1b638e9a6d75b51fd19711d91 100644 (file)
@@ -36,7 +36,8 @@
     {{- else }}
       <li class="bd-links-span-all mt-1 mb-3 mx-4 border-top"></li>
       <li class="bd-links-span-all">
-        <a href="/docs/{{ $.Site.Params.docs_version }}/{{ $group_slug }}/" class="bd-links-link d-inline-block rounded small {{ if $is_active_group }} active{{ end }}"{{ if $is_active_group }} aria-current="page"{{ end }}>
+        {{- $href := urls.JoinPath "/docs" $.Site.Params.docs_version $group_slug "/" }}
+        <a href="{{ $href }}" class="bd-links-link d-inline-block rounded small{{ if $is_active_group }} active{{ end }}"{{ if $is_active_group }} aria-current="page"{{ end }}>
           {{ $group.title }}
         </a>
       </li>