1.2.1 • Published 3 years ago

zzz-markdown v1.2.1

Weekly downloads
10
License
ISC
Repository
github
Last release
3 years ago

zzz-markdown

ZZZ rendered markdown

Usage

const z = require('zzz')
const markdown = require('zzz-markdown')
const darkOneTheme = require('zzz-markdown/dark-one')

const app = z(() => {
  return markdown`.${darkOneTheme}`(`
# Hello world!

Markdown rendered with ZZZ. Includes code highlighting also:

\`\`\`js
const hello = 'world!'
\`\`\`
`)

})

z.mount(app)

API

const component = markdown``(attrs, text)

Render text as Markdown using a stateful component. This will cache the result, but can be cached busted by keying the component. The result is wrapped in a div, to make applying styles across the whole block easy. The element can be changed by composition. attrs are applied to the div.

const className = require('zzz-markdown/dark-one')

Dark One theme as a scoped highlight.js theme. See the example above for usage

Install

npm install zzz-markdown

License

ISC

1.2.1

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago