Markdoc preprocessor for Svelte
svelte-markdoc is a preprocessor for Svelte that allows users to create pages with the .markdoc extension. It is a more constrained editing system where documentation is treated as data, making it different from MDX.
To use svelte-markdoc, follow these steps:
Here is an example of how to configure the preprocessor in svelte.config.js:
import { svelteMarkdoc } from 'svelte-markdoc';
export default {
preprocess: [svelteMarkdoc()],
};
svelte-markdoc is a useful preprocessor for Svelte that allows users to create pages with the .markdoc extension. It provides a more constrained editing system for documentation compared to MDX and integrates well with SvelteKit projects. With svelte-markdoc, users can easily manage and display their documentation as data within their Svelte applications.