Svelte Preprocess Markdown screenshot

Svelte Preprocess Markdown

Author Avatar Theme by Alexxnb
Updated: 14 Aug 2020
139 Stars

Write Svelte components in markdown syntax

Overview

The svelte-preprocess-markdown is a useful tool that allows users to import *.md files as Svelte components. This is particularly beneficial when working with components that contain formatted texts and the user does not want to write them in HTML. The tool is built on the superfast Marked markdown parser.

Features

  • Import *.md files as Svelte components
  • Easy integration with Svelte projects
  • Uses the efficient Marked markdown parser

Installation

To install the svelte-preprocess-markdown package, follow these steps:

  1. Open your terminal or command prompt.
  2. Run the following command:
npm install svelte-preprocess-markdown
  1. After the installation is complete, edit the rollup.config.js file in your project to include the necessary configuration for using svelte-preprocess-markdown.

Summary

The svelte-preprocess-markdown is a valuable tool for Svelte developers who need to import *.md files as Svelte components. It simplifies the process of working with formatted texts and eliminates the need to write them in HTML. With its integration of the Marked markdown parser, it offers a fast and efficient solution for managing markdown content in Svelte projects.