/** * @copyright nhcarrigan * @license Naomi's Public License * @author Naomi Carrigan */ import Markdown from "react-markdown"; import rehypeHighlight from "rehype-highlight"; import rehypeRaw from "rehype-raw"; 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.data.summary}

{`A ${post.data.readtime}.`}

{post.content}

{`Love this post? Think Naomi is completely wrong? Have other thoughts you would like to share? `} {`Come tell us on Discord~!`}

{"← Back to home"} {"See version history"}
); }; export default Page;