Skip to content

Commit 11037f8

Browse files
authored
docs: use urls.JoinPath in more places (#39778)
1 parent d1636a7 commit 11037f8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: site/content/docs/versions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ description: An appendix of hosted documentation for nearly every release of Boo
1313
{{- range $i, $version := $versions }}
1414
{{- $len := len $versions -}}
1515
{{ if (eq $i 0) }}<div class="list-group">{{ end }}
16-
<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 }}/">
16+
<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 "/" }}">
1717
{{ $version }}
1818
{{ if (eq $version $.Site.Params.docs_version) -}}
1919
<span class="badge text-bg-primary">Latest</span>

Diff for: site/layouts/partials/docs-sidebar.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
{{- else }}
3737
<li class="bd-links-span-all mt-1 mb-3 mx-4 border-top"></li>
3838
<li class="bd-links-span-all">
39-
<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 }}>
39+
{{- $href := urls.JoinPath "/docs" $.Site.Params.docs_version $group_slug "/" }}
40+
<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 }}>
4041
{{ $group.title }}
4142
</a>
4243
</li>

0 commit comments

Comments
 (0)