0.1.0 • Published 2 years ago

@monoparser/md-parser v0.1.0

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

A markdown parser based on marked

We provide YAML front matter handler and toc support(WIP)

Install

npm install @monoparser/md-parser

Usage

You can use it as follows:

import { analyseArticle } from '@monoparser/md-parser'

const content = `# Monoparser`

const html = analyseArticle(content)

analyseArticle will return a html with our default class: <h1 class="mono-heading" >Monoparser</h1>

if you want customize your render style, you can run:

import { analyseArticle, defineOptions } from '@monoparser/md-parser'

const options = defineOptions({
  ...your own options
})

// or you can pass a function like this
const options = defineOptions(() => {
  ...your own options
})

analyseArticle(content, options)

If you want toc support(WIP)

const { html, toc } = analyseArticle(content, options, true)

If you want to use our default settings you can run

import '@monoparser/md-parser/default.css'
0.1.0

2 years ago

0.0.5

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.0

2 years ago