Fix project and blog posts

This commit is contained in:
itsfinniii
2026-03-28 19:24:57 +01:00
parent f4319c4165
commit 54e53d278e
7 changed files with 72 additions and 24 deletions

View File

@@ -25,7 +25,10 @@ export async function getStaticPaths() {
}
const settings = await getSettings();
const page = await getPage(settings, Astro.url.pathname);
const pathName = Astro.url.pathname.replace(/\/$/, "");
const page = await getPage(settings, pathName);
console.log(pathName);
if (page === null || page.page === null || !page.page.exists) {
return new Response("Page not found.", {
@@ -33,8 +36,6 @@ if (page === null || page.page === null || !page.page.exists) {
statusText: "Not Found"
});
}
console.log(page);
---
{ page.page.type === "Webpage" && page.page.exists && (