<script lang="ts">
	import { format } from 'date-fns';

	export let data;
</script>

<article data-pagefind-body>
	<h1>{data.title}</h1>
	<time datetime={data.date}>
		{format(new Date(data.date), 'MMMM d, yyyy')}
	</time>
	<svelte:component this={data.content} />
</article>

<style>
	time {
		display: block;
		margin-bottom: 4rem;
	}
</style>
