Skip to content

macoshita/wasm-frontmatter-markdown

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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