- Updated REAMDE.md to reflect current file & folder structure
- Fixed Navbar not working
- Added middleware exceptions for api and public/ (to not auto link to i18n version)
- Fixed blog [slug] and [tag] pages not rendering properly (prerender = true)
This commit is contained in:
2024-06-21 09:20:24 +02:00
parent 5d7cdeb999
commit a1b94ae545
6 changed files with 139 additions and 35 deletions

View File

@ -1,5 +1,4 @@
---
import { getRelativeLocaleUrl } from "astro:i18n";
import { ThemeSelector } from "./ThemeSelector"
import NavbarSkeleton from "./NavbarSkeleton.astro";
import { LangSwitcher } from "./LangSwitcher";
@ -7,8 +6,7 @@ import { NavButton } from "./NavButton";
function selected(path) {
var currentURL = Astro.url.pathname
.replace(Astro.currentLocale + "/", "")
.slice(0, -1) || "/";
.replace(Astro.currentLocale + "/", "") || "/"
if( path == "/blog" && currentURL.startsWith("/blog") ){
return (true);
}