lukeonline - commit 392ff65
feat: blog header and refactor392ff6507842424baae185e93e5b57256c27a419Luke Jones<lukep@donovan.local>2026-07-16T23:42:17+01:00diff --git a/src/components/Header.astro b/src/components/Header.astro
index 7213f66..e76b91a 100644
--- a/src/components/Header.astro
+++ b/src/components/Header.astro
@@ -4,7 +4,7 @@ const { title } = Astro.props;
const linkStyling = "hover:bg-gray-300 grow text-center"
---
<header class="flex flex-col gap-1">
- <h1 class="text-2xl font-bold">Luke Jones</h1>
+ <span class="text-2xl font-bold">Luke Jones</span>
<nav class="flex flex-row justify-between">
<a class={linkStyling} href="/">Home</a>
<a class={linkStyling} href="/projects">Projects</a>
diff --git a/src/pages/blog/[id].astro b/src/pages/blog/[id].astro
new file mode 100644
index 0000000..cec2dcf
--- /dev/null
+++ b/src/pages/blog/[id].astro
@@ -0,0 +1,35 @@
+---
+import Base from "../../layouts/Base.astro";
+
+import { getCollection, render } from "astro:content";
+
+export async function getStaticPaths() {
+ const posts = await getCollection("blog");
+
+ return posts.map((post) => ({
+ params: {
+ id: post.id,
+ },
+ props: {
+ post,
+ },
+ }));
+}
+
+const { post } = Astro.props;
+const { Content } = await render(post);
+
+console.log(post)
+---
+<Base title={post.data.title}>
+ <div class="flex flex-col gap-6">
+ <div class="flex flex-col gap-2">
+ <span class="flex flex-col">
+ <h1 class="text-2xl font-medium">{post.data.title}</h1>
+ <span class="text-sm font-light">{post.data.date.toDateString()}</span>
+ </span>
+ <span>{post.data.desc}</span>
+ </div>
+ <Content />
+ </div>
+</Base>