Skip to content

Commit

Permalink
Fixing baseUrl related issues
Browse files Browse the repository at this point in the history
  • Loading branch information
petrovicz committed Apr 4, 2024
1 parent e67253f commit 3099e6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Navbar.astro
Original file line number Diff line number Diff line change
@@ -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;
---

Expand Down
3 changes: 2 additions & 1 deletion src/layouts/Layout.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
import Navbar from "../components/Navbar.astro";
const baseUrl = import.meta.env.BASE_URL;
---

<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/svg+xml" href=`${baseUrl}/favicon.svg` />
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="description" content="Demonstrating PhotoSwipe inside Astro, with automatic image optimizations." />
Expand Down

0 comments on commit 3099e6b

Please sign in to comment.