Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

svelte-render-md

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

svelte-render-md

A library that allows reading of yaml frontmatter from a .md file and rendering the md content as html. MD conversion done using Showdown and YAML parsing done using yaml-js. ## Usage ### Read YAML Frontmatter ``` import { readMDFile } from "svelte-r

  • 0.0.3
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

svelte-render-md

Description

A library that allows reading of yaml frontmatter from a .md file and rendering the md content as html. MD conversion done using Showdown and YAML parsing done using yaml-js.

Usage

Read YAML Frontmatter

import { readMDFile } from "svelte-render-md";
let mdFile = readMDFile("myFile.md");
let frontmatter = mdFile.frontmatter;

Render md as HTML

You can render any md string as html:

<script>
  import { RenderHTML } from "svelte-render-md";
</script>

<RenderHTML mdString="# Test String\n This is to test" />

You can also render an md file as html:

<script>
  import { RenderHTML, readMDFile } from "svelte-render-md";
  let mdFile = readMDFile("myFile.md");
  let mdStr = mdFile.content;
 </script>
 
 <RenderHTML mdString={mdStr} />

FAQs

Package last updated on 24 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc