initial commit

This commit is contained in:
Hunter
2026-11-01 13:23:44 -05:00
commit e03ea4f770
53 changed files with 10802 additions and 0 deletions

23
app/posts/[slug]/page.tsx Normal file
View File

@@ -0,0 +1,23 @@
import { notFound } from "next/navigation";
import PostEditor from "@/components/PostEditor";
import { listImages } from "@/lib/images";
import { categoryCounts, readPosts, tagCounts } from "@/lib/store";
export const dynamic = "force-dynamic";
export default async function EditPostPage({ params }: { params: Promise<{ slug: string }> }) {
const { slug } = await params;
const { posts, revision } = await readPosts();
const post = posts.find((p) => p.slug === slug);
if (!post) notFound();
return (
<PostEditor
post={post}
revision={revision}
files={await listImages(slug)}
categories={categoryCounts(posts).map((c) => c.name)}
tags={tagCounts(posts).map((t) => t.name)}
/>
);
}