feat: set up announcements page

This commit is contained in:
2025-01-22 22:40:19 -08:00
parent 1d2f8061fe
commit 9d81ce456b
12 changed files with 2938 additions and 152 deletions

View File

@ -0,0 +1,23 @@
import { Rule } from "@/components/rule";
import { getPostData } from "@/lib/posts";
import Markdown from "react-markdown";
import remarkGfm from "remark-gfm";
export default async function Page({
params
}: {
params: Promise<{slug: string}>
}) {
const { slug } = await params;
const post = getPostData(slug);
return (
<main>
<h1>{post.data.title}</h1>
<p className="italic text-center">{`Published ${post.data.date.toLocaleDateString("en-GB", { weekday: "long", year: "numeric", month: "long", day: "numeric"})}`}</p>
<Rule />
<Markdown remarkPlugins={[remarkGfm]}>{post.content}</Markdown>
<Rule />
<a href="/">{"← Back to home"}</a>
</main>
)
}