A simple Node.js wrapper for markdown-it
. This tool helps to convert HackMD markdown files to HTML files.
npm install -g hackmd-to-html-cli
Input: ./example/index.md
Output: https://ksw2000.github.io/hackmd-to-html-cli/
$ hmd2html --help
hmd2html --help
Usage: index [options]
Options:
-v, --version output the current version
-s, --source <files_or_dirs...> specify the input markdown files or directories
-d, --destination <path> specify the output directory (default: ./output)
-l, --layout <html_file> specify the layout file (default: "")
-b, --hardBreak use hard break instead of soft break
-h, --help display help for command
# files
$ hmd2html -s file1.md file2.md file3.md
# directories
$ hmd2html -s ./dir1 ./dir2
# files or directories
$ hmd2html -s file1.md ./dir1
$ hmd2html -s file1.md -d ./out
$ hmd2html -s hello.md -l ./myLayout.html
- /
- output/ generated
- hello.html
- hello.md
- myLayout.html
- output/ generated
./myLayout.html
<html>
<head></head>
<body>
{{main}}
</body>
</html>
./hello.md
# hello
./output/hello.html
<html>
<head></head>
<body>
<h1>hello</h1>
</body>
</html>
npm run lint
to check the format of source code.npm test
to test this package, which generates result from./example
into./output
.
- Provide more templates & styles
- Support more HackMD syntax
- specifiy your name, time and color to vary the blockquotes.
- YAML Metadata
- Render CSV as table
- PlantUML
- Fretboard
- Support externals