Skip to main content Podcasting 4 Value

A Markdown post with a Svelte component

Published: 2021-12-01
Updated: 2021-12-01

This starter includes an Callout.svelte component. It’s not particularly useful on its own, but here’s how you might use it inside of a Markdown post, thanks to mdsvex.

This is an example of the Callout.svelte component! Find it in src/lib/components/Callout.svelte.

You can inject any Svelte components you want into Markdown! Just import them in a <script> tag and then use them wherever you like.

For that matter, you can inject any HTML anywhere! (Note that you cannot use Markdown inside Svelte components or HTML, however. Any opened tag must be closed before returning to Markdown.)