@sphido/markdown

1.1.0 • Public • Published

@sphido/markdown

Sphido page extender that transform page.content markdown to HTML with marked.

Install

yarn add @sphido/markdown

Example

import globby from 'globby';
import {getPages} from '@sphido/core';
import {markdown, renderer} from '@sphido/markdown';
 
// @see https://marked.js.org/using_pro#renderer

renderer({
  table: (header, body)  => `<table class="table table-bordered table-striped bg-white m-1">${header}${body}</table>`
});

(async () => {

  const pages = await getPages(
    await globby('content/**/*.{md,html}'),
    markdown
  );

})();

Source codes

https://github.com/sphido/sphido/tree/main/packages/sphido-markdown

Readme

Keywords

none

Package Sidebar

Install

npm i @sphido/markdown

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

2.69 kB

Total Files

4

Last publish

Collaborators

  • ozzyczech