0.2.1 • Published 5 years ago
@macoshita/wasm-frontmatter-markdown v0.2.1
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-markdownconst 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.shPublish
wasm-pack publish -a publicToDo
- Automatically publish by GitHub Action