-
-
-
diff --git a/src/components/Posts.astro b/src/components/Posts.astro
new file mode 100644
index 0000000..df627c6
--- /dev/null
+++ b/src/components/Posts.astro
@@ -0,0 +1,111 @@
+---
+import { getCollection } from 'astro:content';
+
+// Get all blog posts from your content collection
+const posts = await getCollection('blog');
+// Sort by date if you have a date field in frontmatter
+const sortedPosts = posts.sort((a, b) =>
+ b.data.date.getTime() - a.data.date.getTime()
+);
+---
+
+
+
+
+
+
diff --git a/src/content/blog/first-post.md b/src/content/blog/first-post.md
new file mode 100644
index 0000000..a322529
--- /dev/null
+++ b/src/content/blog/first-post.md
@@ -0,0 +1,21 @@
+---
+title: "My First Blog Post"
+date: 2025-10-16
+description: "This is my first blog post"
+---
+
+# Welcome to my blog!
+
+This is the content of my first blog post.
+
+## Features
+
+- Markdown support
+- Code blocks
+- And more!
+
+# Hello World
+
+```javascript
+console.log("Hello, world!");
+```
\ No newline at end of file
diff --git a/src/content/blog/second-post.md b/src/content/blog/second-post.md
new file mode 100644
index 0000000..a322529
--- /dev/null
+++ b/src/content/blog/second-post.md
@@ -0,0 +1,21 @@
+---
+title: "My First Blog Post"
+date: 2025-10-16
+description: "This is my first blog post"
+---
+
+# Welcome to my blog!
+
+This is the content of my first blog post.
+
+## Features
+
+- Markdown support
+- Code blocks
+- And more!
+
+# Hello World
+
+```javascript
+console.log("Hello, world!");
+```
\ No newline at end of file
diff --git a/src/content/config.ts b/src/content/config.ts
new file mode 100644
index 0000000..986b093
--- /dev/null
+++ b/src/content/config.ts
@@ -0,0 +1,12 @@
+import { defineCollection, z } from 'astro:content';
+
+const blog = defineCollection({
+ type: 'content',
+ schema: z.object({
+ title: z.string(),
+ date: z.coerce.date(),
+ description: z.string().optional(),
+ }),
+});
+
+export const collections = { blog };
\ No newline at end of file
diff --git a/src/pages/blog.astro b/src/pages/blog.astro
new file mode 100644
index 0000000..9afe886
--- /dev/null
+++ b/src/pages/blog.astro
@@ -0,0 +1,29 @@
+---
+import Layout from "../layouts/Layout.astro";
+import Intro from "../components/Intro.astro";
+//import Projects from "../components/Projects.astro";
+import Posts from "../components/Posts.astro";
+import WaveDivider from "../components/WaveDivider.astro";
+//import Webring from "../components/Webring.astro";
+//import SpotifyNowPlaying from "../components/SpotifyNowPlaying.astro";
+import Socials from "../components/Socials.astro";
+
+// TODO: Fill in your preferences.
+const variables = {
+ name: "Kristian Emil Takvam",
+ subtitles:
+ "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent lobortis nisi ante, nec tincidunt ligula mattis nec. Maecenas metus mauris, fermentum et vulputate ut, dapibus vel massa.",
+};
+---
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index.astro b/src/pages/index.astro
index 5dc3786..3152255 100644
--- a/src/pages/index.astro
+++ b/src/pages/index.astro
@@ -2,7 +2,7 @@
import Layout from "../layouts/Layout.astro";
import Intro from "../components/Intro.astro";
import Projects from "../components/Projects.astro";
-import Blog from "../components/Blog.astro";
+import Posts from "../components/Posts.astro";
import WaveDivider from "../components/WaveDivider.astro";
import Webring from "../components/Webring.astro";
import SpotifyNowPlaying from "../components/SpotifyNowPlaying.astro";
@@ -21,7 +21,7 @@ const variables = {
-
+
diff --git a/src/pages/posts/post-1.md b/src/pages/posts/post-1.md
index 7984dae..fdf8408 100644
--- a/src/pages/posts/post-1.md
+++ b/src/pages/posts/post-1.md
@@ -1,13 +1,6 @@
---
-layout: ../../layouts/PostLayout.astro
-title: 'My First Blog Post'
-pubDate: 2022-07-01
-description: 'This is the first post of my new Astro blog.'
-author: 'Astro Learner'
-image:
- url: 'https://docs.astro.build/assets/rose.webp'
- alt: 'The Astro logo on a dark background with a pink glow.'
-tags: ["astro", "blogging", "learning in public"]
+title: "My First Blog Post"
+date: 2025-01-01
---
# My First Blog Post
diff --git a/src/pages/posts/post-2.md b/src/pages/posts/post-2.md
index d2d21ed..389d202 100644
--- a/src/pages/posts/post-2.md
+++ b/src/pages/posts/post-2.md
@@ -1,12 +1,5 @@
---
-layout: ../../layouts/PostLayout.astro
-title: My Second Blog Post
-author: Astro Learner
-description: "After learning some Astro, I couldn't stop!"
-image:
- url: "https://docs.astro.build/assets/arc.webp"
- alt: "The Astro logo on a dark background with a purple gradient arc."
-pubDate: 2022-07-08
-tags: ["astro", "blogging", "learning in public", "successes"]
+title: "My First Blog Post"
+date: 2025-01-01
---
After a successful first week learning Astro, I decided to try some more. I wrote and imported a small component from memory!
\ No newline at end of file
diff --git a/src/pages/posts/post-3.md b/src/pages/posts/post-3.md
index a6fe8c1..b670e10 100644
--- a/src/pages/posts/post-3.md
+++ b/src/pages/posts/post-3.md
@@ -1,12 +1,5 @@
---
-layout: ../../layouts/PostLayout.astro
-title: My Third Blog Post
-author: Astro Learner
-description: "I had some challenges, but asking in the community really helped!"
-image:
- url: "https://docs.astro.build/assets/rays.webp"
- alt: "The Astro logo on a dark background with rainbow rays."
-pubDate: 2022-07-15
-tags: ["astro", "learning in public", "setbacks", "community"]
+title: "My First Blog Post"
+date: 2025-01-01
---
It wasn't always smooth sailing, but I'm enjoying building with Astro. And, the [Discord community](https://astro.build/chat) is really friendly and helpful!
\ No newline at end of file