svelte-mdx
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Svelte MDX

MDX preprocessor for Svelte Kit

Installation

Install with your favourite package manager: npm, pnpm or bun.

npm i svelte-mdx

Getting started

Limitations

  • svelte:... or on:... don't work.
  • {#if} etc. also don't

How does it work?

stateDiagram-v2
    state "Transformed" as t0
    state "Transformed" as t1
    state "Svelte Compiler" as svelte

    [*] --> Markdown: Parse .md file
    state Markdown {
        [*] --> Cleaned: Parse and remove frontmatter
        Cleaned --> t0: User markdown (remark) plugins
        t0 --> [*]
    }
    Markdown --> HTML: Conversion
    state HTML {
        [*] --> t1: User html (rehype) plugins
        t1 --> t1: Inject glue code
        t1 --> [*]
    }
    HTML --> svelte: Stringify

Readme

Keywords

none

Package Sidebar

Install

npm i svelte-mdx

Weekly Downloads

0

Version

1.0.2

License

none

Unpacked Size

8.74 kB

Total Files

9

Last publish

Collaborators

  • cupcakearmy