From 3099e6b9d59ab3cabc4946d0698d962e5b8eb5f0 Mon Sep 17 00:00:00 2001 From: Petrovicz Date: Thu, 4 Apr 2024 13:54:59 +0200 Subject: [PATCH] Fixing baseUrl related issues --- src/components/Navbar.astro | 4 ++-- src/layouts/Layout.astro | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index f8bf1aa..c261e33 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,7 +1,7 @@ --- const baseUrl = import.meta.env.BASE_URL; -const hrefHome = `${baseUrl}/`; -const hrefSub = `${baseUrl}/subpage`; +const hrefHome = `${baseUrl}`; +const hrefSub = `${baseUrl}/subpage/`; const currentPath = Astro.url.pathname; --- diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 06db700..1f7dd44 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,11 +1,12 @@ --- import Navbar from "../components/Navbar.astro"; +const baseUrl = import.meta.env.BASE_URL; --- - +