Skip to content

macoshita/wasm-frontmatter-markdown

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wasm-frontmatter-markdown

About

This repository is for my blog.

  • Parse frontmatter markdown
  • Convert frontmatter to json
  • Convert content to html
    • Syntax highlighting

Attention

When Syntax hilighting of TypeScript at first is too slow. Maybe Syntect and fancy regex is slow.

Usage

npm i wasm-frontmatter-markdown
const parser = require("@macoshita/wasm-frontmatter-markdown");

const options = {
  frontmatter: true,
  content: true,
};

parser.parse(
  `---
hello: world
---

# hoge

\`\`\`js
const hello = 'world'
\`\`\`
`,
  options
);

Build

Install nodejs and wasm-pack and build

./build.sh

Publish

wasm-pack publish -a public

ToDo

  • Automatically publish by GitHub Action

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
MIT
LICENSE_MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published