Just two code lines in Svelte to support MDX, frontmatter in markdown and Svelte components in markdown, made with SvelteKit, Contentlayer and MDsveX.
Contentlayer is a fast and easy content SDK that validates and transforms the markdown content into type-safe JSON.
GitHub Repository, have a look into /src/routes/posts/[slug]/+page.ts line 13 and +page.svelte line 15.