/** * @copyright nhcarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import Markdown from "react-markdown"; import remarkGfm from "remark-gfm"; import type { JSX } from "react"; import { Rule } from "@/components/rule"; import { getPostData } from "@/lib/posts"; /** * Renders a blog post. * @param props - The properties of the page. * @param props.params - The path parameters. * @returns The JSX component. */ const Page = async({ params, }: { readonly params: Promise<{ slug: string }>; }): Promise => { const { slug } = await params; const post = getPostData(slug); return (

{post.data.title}

{`Published ${post.data.date.toLocaleDateString("en-GB", { day: "numeric", month: "long", weekday: "long", year: "numeric" })}`}

{post.content} {"← Back to home"}
); }; export default Page;