diff --git a/astro.config.mjs b/astro.config.mjs index 952752f..3d05bdc 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -4,6 +4,10 @@ import remarkMath from "remark-math"; import rehypeKatex from "rehype-katex"; export default defineConfig({ + trailingSlash: "always", + build: { + format: "directory", + }, integrations: [ mdx({ remarkPlugins: [remarkMath], diff --git a/scripts/deploy.sh b/scripts/deploy.sh old mode 100644 new mode 100755 diff --git a/src/components/Header.astro b/src/components/Header.astro index a6210eb..4f78e03 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -2,8 +2,11 @@ const path = Astro.url.pathname; const isHome = path === "/" || path === "/index.html"; -// Determine topic from path function getTopic() { +if (path.startsWith("/about")) { + return "/about"; + } + const pathname = path.split("/"); if (pathname.length === 2 && pathname[1].endsWith(".html")) { @@ -28,16 +31,14 @@ const promptText = topic ? `barrett@ruth:~$ ${topic}` : "barrett@ruth:~$";
diff --git a/src/pages/index.astro b/src/pages/index.astro index 1c9c43e..4565f68 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -152,7 +152,7 @@ Object.keys(postsByCategory).forEach((category) => { .pop() .replace(/\.mdx?$/, ""); - link.href = `/posts/${topic}/${slug}`; + link.href = `/posts/${topic}/${slug}/`; link.textContent = post.data.title; link.style.textDecoration = "underline";