add paragraph spacing

This commit is contained in:
Benjamin Palko 2025-06-20 11:56:39 -04:00
parent 570f5dde1d
commit 8281fdc4e2
2 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,11 @@
<script lang="ts">
import type { Snippet } from 'svelte';
interface Props {
children?: Snippet;
}
const { children }: Props = $props();
</script>
<p class="my-3">{@render children?.()}</p>

View file

@ -6,6 +6,7 @@
import SvelteMarkdown from '@humanspeak/svelte-markdown';
import dayjs from 'dayjs';
import type { PageProps } from './$types';
import Paragraph from '$lib/markdown/renderers/Paragraph.svelte';
let { data }: PageProps = $props();
@ -21,7 +22,13 @@
<div class="w-full max-w-5xl px-4">
<SvelteMarkdown
source={data.post.body}
renderers={{ link: Link, code: Code, blockquote: BlockQuote, heading: Heading }}
renderers={{
link: Link,
code: Code,
blockquote: BlockQuote,
heading: Heading,
paragraph: Paragraph
}}
/>
</div>
</div>