DEV Community

Discussion on: Building a blog with Svelte: Adding Markdown

Collapse
 
chrsjxn profile image
Chris Jackson

Mine are currently very simple, and very manual. The page component for this post just looks like this:

<script>
  import { Layout, MarkdownPost } from '../Components'
  import markdown from '../Markdown/AddingMarkdownToSvelte.md'
</script>

<Layout>
  <MarkdownPost {markdown} />
</Layout>
Enter fullscreen mode Exit fullscreen mode

I am still thinking about a build step that generates these components and their routes based on the structure of my markdown directory. My level of rollup knowledge isn't that high yet, though, so I'm just writing the extra glue by hand right now.