Skip to content

Commit eed272c

Browse files
authored
ProductSelector: Fix absolute paths (#374)
* ProductSelector: Fix absolute paths * ProductSelector: Remove / from product selector urls
1 parent 020d03e commit eed272c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

exampleSite/data/product-selector.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- productGroup: Test Product
22
products:
33
- title: "Test Product"
4-
url: "/test-product"
4+
url: "test-product"
55

66
- productGroup: Test External Links
77
products:
@@ -12,4 +12,4 @@
1212
- productGroup: NGINX
1313
products:
1414
- title: "NGINX"
15-
url: "/nginx"
15+
url: "nginx"

layouts/partials/sidebar-v2.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h3 class="product-selector__product-group">{{ $group.productGroup }}</h3>
5353
{{ range $product := $products }}
5454
<li class="product-selector__product">
5555
<a
56-
href="{{ $product.url }}"
56+
href="{{ absURL $product.url }}"
5757
aria-label="{{ $product.title }} documentation"
5858
{{ if $product.extUrl }} target="_blank" {{ end }}
5959
>

0 commit comments

Comments
 (0)