MDsveX README

The project's README from github.com/pngwn/MDsveX. As one markdown file: README.md.

mdsvex

A Markdown preprocessor for Svelte. Markdown in Svelte.

mdsvex.com

Packages

This is a monorepo containing mdsvex and any supporting packages. Each repo has its own readme with more details.

Contributing

Contributions are welcome. This repo uses changesets to manage changelogs and versioning. All pull requests need an accompanying changeset file (PRs to the documentation website do not need a changeset file). If you know how changesets work then feel free to add one with the appropriate packages, versions and a description of the change. If you don't know how changesets work, don't worry about it, I am happy to add one (a little robot will also add some details to the PR when you open it as well, if you want to learn more).

MDsveX (pngwn/MDsveX)

Searching Database…

3.1K ·GitHub
What is this?mdsvex is a Markdown preprocessor for Svelte — it lets you write Markdown inside Svelte projects and turns it into Svelte components at build time.
Is this a library I add to my Svelte project, or a separate app I run?It's a library: you add the mdsvex package to a Svelte project and hook it into the build step as a preprocessor — there's no standalone app to run.
How do I get it into a project?Install the mdsvex package from npm as a dev dependency and register it as a preprocessor in your Svelte config; the docs site mdsvex.com has the full setup guide.
I'm building a blog or content site with Svelte — what does this give me?You write your content in Markdown while still using Svelte components in the same project; mdsvex compiles the Markdown as part of the build, which is the typical setup for Svelte blogs.
What's inside the repo besides mdsvex itself?It's a monorepo: alongside mdsvex there's a documentation site, svelte-parse (turns Svelte components into a svast AST), svast (an AST specification with TypeScript definitions), svast-stringify (turns a svast AST back into a Svelte component) and svast-utils.
What is svast?An AST specification with accompanying TypeScript definitions. The supporting packages are built around it: svelte-parse generates a svast tree from Svelte components, and svast-stringify converts such a tree back into a Svelte component.
Do I need to understand compilers or ASTs to use it?No — svast, svelte-parse, svast-stringify and svast-utils are supporting packages behind the scenes; as a user you just add the mdsvex preprocessor to your project and write Markdown.
What are similar projects?babel, marked, acorn, markdown-it, mitosis, nextra, postcss, oxc
Creator
pngwn
Size
16 MB
Stars
3.1K
Age
7y
Commits · 90 Days