aboutsummaryrefslogtreecommitdiff
path: root/src/pages/blog
diff options
context:
space:
mode:
authorAndrew Lee <andrew@alee14.me>2026-10-18 17:20:07 -0400
committerAndrew Lee <andrew@alee14.me>2026-10-18 17:20:07 -0400
commit7eaa858a500690f036ba23881c38648173905bb6 (patch)
tree05863cab56f1ce8d29852571fe9f043f14e8e8d2 /src/pages/blog
parent817beebb7e2da3f997e114bba3b3ef117df7c682 (diff)
downloadpersonal-website-7eaa858a500690f036ba23881c38648173905bb6.tar.gz
personal-website-7eaa858a500690f036ba23881c38648173905bb6.tar.bz2
personal-website-7eaa858a500690f036ba23881c38648173905bb6.zip
removed vercel adapter (website is now fully static); new plausible script
Diffstat (limited to 'src/pages/blog')
-rw-r--r--src/pages/blog/[...slug].astro11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pages/blog/[...slug].astro b/src/pages/blog/[...slug].astro
index 6dc78ba..8c8aea9 100644
--- a/src/pages/blog/[...slug].astro
+++ b/src/pages/blog/[...slug].astro
@@ -1,7 +1,16 @@
---
import Page from '../../layouts/BlogPost.astro';
-import { getEntry, render } from 'astro:content';
+import { getEntry, getCollection, render } from 'astro:content';
import { formatDate } from "../../util";
+
+export async function getStaticPaths() {
+ const posts = await getCollection('blog')
+ return posts.map((post) => ({
+ params: { slug: post.id },
+ props: { post },
+ }))
+}
+
const { slug } = Astro.params;
if (slug === undefined) {