You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Convert [HackMD](https://hackmd.io/) markdown to HTML.
5
+
Not only is this a CLI tool, but it is also an importable package for converting standard Markdown and even [HackMD](https://hackmd.io/)-supported Markdown into HTML.
6
+
7
+
+ See the example of input markdown: [./example/index.md](https://raw.githubusercontent.com/ksw2000/hackmd-to-html-cli/main/example/index.md)
8
+
9
+
+ See the example of output html: [https://ksw2000.github.io/hackmd-to-html-cli/](https://ksw2000.github.io/hackmd-to-html-cli/)
See default layout here: https://github.com/ksw2000/hackmd-to-html-cli/blob/main/layout.html
92
+
93
+
+`{{main}}` renders main content of markdown.
94
+
+`{{lang}}` renders lang property if there are yaml metadata about `lang` in markdown file. e.g. `lang="zh-TW"`
95
+
+`{{dir}}` renders dir property if there are yaml metadata about `dir` in markdown file. e.g. `dir="ltr"`
96
+
+`{{meta}}` renders meta tag if there are yaml metadata about `title`, `description`, `robots` or`image`. e.g. `<meta name="robots" content="noindex">`
97
+
89
98
## Develop
90
99
91
100
1.`npm run lint` to check the format of source code.
| others | ✅ | Hide the metadata by html comment |
174
185
175
-
HackMD sets the `lang` tag and `dir` tag at the beginning of `<body>`. hmd2html sets the the `lang` tag and `dir` tag at `<html>`.
186
+
HackMD sets the `lang` tag and `dir` tag at the beginning of `<body>`. hmd2html sets the the `lang` tag and `dir` tag at `<html>` when using default layout.
176
187
177
188
## TODO
178
189
179
-
+ Provide more templates & styles
180
-
+ Support more HackMD [syntax](https://hackmd.io/features-tw?both)
0 commit comments