Closed projectashik closed 1 year ago
You can use like this:
<script lang="ts">
import Markdown from 'svelte-exmarkdown';
import remarkFrontmatter from 'remark-frontmatter';
const plugins = [
{ remarkPlugin: [remarkFrontmatter, ['yaml']] },
];
let md = `\
---
title: test
---
# Hello`;
</script>
<textarea bind:value={md} />
<Markdown {md} {plugins} />
However, svelte-exmarkdown can't expose frontmatter data. The above example can only be rendered ignoring Frontmatter. If you want to use frontmatter data, you should use another package such as front-matter together.
I'm trying to use the remark frontmatter with the svelte-exmarkdown, but it's not working.