Skip to content

Commit 91d65b6

Browse files
committed
fix path regex
1 parent 6c97d4b commit 91d65b6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/components/VersionSelector.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
import navigation from '../navigation.json'
33
4-
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/3.x/panels/installation/", "3.x", "panels", "installation"];
4+
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/3.x/panels/installation/", "3.x", "panels", "installation"];
55
let currentVersion = segments[1].replaceAll("/", "");
66
let currentSection = segments[2].replaceAll("/", "");
77
let currentPage = (segments[3] ?? null)?.replaceAll("/", "");

docs/src/layouts/BaseLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ let isHomePage = Astro.url.pathname === "/docs";
2929
3030
let tableOfContents = headings.length > 0 ? collectHeadings(headings) : [];
3131
32-
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/4.x/introduction/overview/", "3.x", "panels", "installation"];
32+
let segments = Astro.url.pathname.match(/\/([0-9]*\.x)\/([a-z\-\_]*)\/([a-z\-\_]*)/) || ["/3.x/panels/installation/", "3.x", "panels", "installation"];
3333
3434
let currentVersion = segments[1].replaceAll("/", "");
3535
let currentPackage = segments[2].replaceAll("/", "");

0 commit comments

Comments
 (0)