<script context="module">
    import { formatDate } from './datefmt.js';
    import { makeSlug } from '$lib/slug.js';
    import Link from './Link.svelte';
    export { Link as a };
</script>

<script>
    export let title, date;
</script>

<svelte:head>
    <title>{title}</title>
</svelte:head>

<div id="post">
    <h1 id="{makeSlug(title)}">{title}</h1>
    <p><em>{formatDate(date)}</em></p>
    <slot></slot>
</div>
