Svelte in markdown

This feature allows you to write <style>, <script>, <script context="module">, #if, #each, #await, @html, @const, <svelte:xxx> in .md files

Basic

Here's a basic example with #if, #each, #await, @html, @const

  • 1: foo
  • 2: bar
  • 3: zoo

Fail

Loading

Content render with @html

Syntax Restrictions

Always use quotes in markdown files.

-
+
<script>
  let  = 0
</script>
<button on:click={() => ++}></button> 
<button on:click="{() => ++}"></button> 
svelte

A Counter

A counter

Import svelte in md

Last update at: 2024/03/19 03:48:03