2026-03-02T08-41-54_auto_memory/memories.db-wal

This commit is contained in:
Nicholai Vogel 2026-03-02 01:41:54 -07:00
parent cbc9514c84
commit de0641bd61
2 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,48 @@
---
import BaseLayout from "@/layouts/BaseLayout.astro";
import BlogCard from "@/components/blog/BlogCard.astro";
import { getCollection } from "astro:content";
export async function getStaticPaths() {
const posts = await getCollection("blog");
const tags = [...new Set(posts.flatMap((p) => p.data.tags))];
return tags.map((tag) => ({
params: { tag },
props: {
tag,
posts: posts
.filter((p) => p.data.tags.includes(tag))
.sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf()),
},
}));
}
const { tag, posts } = Astro.props;
---
<BaseLayout
title={`Posts tagged "${tag}" — ChatGPT to Claude`}
description={`All blog posts tagged with "${tag}".`}
>
<section class="pt-24 pb-16 px-4 sm:px-6">
<div class="max-w-4xl mx-auto">
<h1 class="text-3xl font-bold text-text mb-2">#{tag}</h1>
<p class="text-text-muted mb-10">
{posts.length} post{posts.length !== 1 ? "s" : ""} tagged with "{tag}"
</p>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
{
posts.map((post: any) => (
<BlogCard
title={post.data.title}
description={post.data.description}
pubDate={post.data.pubDate}
slug={post.id}
category={post.data.category}
/>
))
}
</div>
</div>
</section>
</BaseLayout>

Binary file not shown.