import { ReactNode } from 'react' import { formatDate } from 'pliny/utils/formatDate' import { CoreContent } from 'pliny/utils/contentlayer' import type { Blog } from 'contentlayer/generated' import Comments from '@/components/Comments' import Link from '@/components/Link' import PageTitle from '@/components/PageTitle' import SectionContainer from '@/components/SectionContainer' import siteMetadata from '@/data/siteMetadata' import ScrollTopAndComment from '@/components/ScrollTopAndComment' interface LayoutProps { content: CoreContent children: ReactNode next?: { path: string; title: string } prev?: { path: string; title: string } } export default function PostLayout({ content, next, prev, children }: LayoutProps) { const { path, slug, date, title } = content return (
Published on
{title}
{children}
{siteMetadata.comments && (
)}
) }