Skip to content

Commit 5d09814

Browse files
spboyerCopilot
andcommitted
fix: show top nav bar on all pages and fix link paths for SWA
- Remove isLandingPage condition so nav links appear on every page - Remove /waza/ prefix from nav hrefs (base path removed for Azure SWA) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8c9e899 commit 5d09814

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

site/src/components/Header.astro

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@ const shouldRenderSearch =
1111
config.pagefind || config.components.Search !== '@astrojs/starlight/components/Search.astro';
1212
1313
const navLinks = [
14-
{ label: 'Getting Started', href: '/waza/getting-started/' },
15-
{ label: 'Guides', href: '/waza/guides/eval-yaml/' },
16-
{ label: 'Reference', href: '/waza/reference/cli/' },
17-
{ label: 'About', href: '/waza/about/' },
14+
{ label: 'Getting Started', href: '/getting-started/' },
15+
{ label: 'Guides', href: '/guides/eval-yaml/' },
16+
{ label: 'Reference', href: '/reference/cli/' },
17+
{ label: 'About', href: '/about/' },
1818
];
1919
2020
const currentPath = Astro.url.pathname;
21-
const isLandingPage = currentPath === '/waza/' || currentPath === '/waza';
2221
---
2322

2423
<div class="header">
2524
<div class="title-wrapper sl-flex">
2625
<SiteTitle />
2726
</div>
2827
<nav class="site-nav sl-hidden md:sl-flex print:hidden">
29-
{isLandingPage && navLinks.map((link) => (
28+
{navLinks.map((link) => (
3029
<a
3130
href={link.href}
3231
class:list={['nav-link', { active: currentPath.startsWith(link.href) }]}

0 commit comments

Comments
 (0)