import { pageMetadata } from '@/app/metadata' import { TableOfContents } from '@/components/post/TableOfContents' import { getPageBySlug } from '@/lib/posts' import type { Metadata } from 'next' /** Metadata for a standalone page served at `/` from content/pages/.md. */ export async function markdownPageMetadata(slug: string): Promise { const { meta } = await getPageBySlug(slug) return pageMetadata({ title: meta.title, description: meta.description, path: `/${slug}` }) } /** Renders a standalone page from content/pages/.md. */ export async function MarkdownPage({ slug }: { slug: string }) { const { meta, content, tableOfContents } = await getPageBySlug(slug) return (

{meta.title}

{meta.description}

{content}
) }