HonKit 的目标是简化创建漂亮电子书和文档的过程。
HonKit 使用 Markdown 作为主要的文档格式,并提供了一种轻松的方式来编写和组织文档内容。您可以使用 Markdown 语法添加标题、段落、列表、代码块、链接等元素,同时支持插入图片和数学公式等高级功能。
----------------------------
cd ~
$ mkdir honkit-dir-made-by-me
$ cd honkit-dir-made-by-me
$ npm init --yes (会在当前目录下,生成package.json)
显示:
Wrote to C:\Users\12799\honkit-dir-made-by-me\package.json
$ ls
package.json
$ npm install honkit --save-dev
$ npm audit fix --force
$ ls
node_modules/ package-lock.json package.json
$ npx honkit init
显示:
warn: no summary file in this book
info: create README.md
info: create SUMMARY.md
info: initialization is finished
$ ls
README.md SUMMARY.md node_modules/ package-lock.json package.json
$ npx honkit serve
显示:
Live reload server started on port: 35729
Press CTRL+C to quit ...
info: >> Starting server ...
info: 6 plugins are installed
info: 6 explicitly listed
info: plugin "livereload" is loaded
info: plugin "highlight" is loaded
info: plugin "search" is loaded
info: plugin "lunr" is loaded
info: plugin "fontsettings" is loaded
info: plugin "theme-default" is loaded
info: found 1 pages
info: found 2 asset files
info: >> generation finished with success in 0.6s !
Serving book on http://localhost:4000
$ npx honkit build
显示:
info: 5 plugins are installed
info: 5 explicitly listed
info: plugin "highlight" is loaded
info: plugin "search" is loaded
info: plugin "lunr" is loaded
info: plugin "fontsettings" is loaded
info: plugin "theme-default" is loaded
info: found 1 pages
info: found 2 asset files
info: >> generation finished with success in 0.6s !
$ ls
README.md SUMMARY.md _book/ node_modules/ package-lock.json package.json
$ ls _book
gitbook/ index.html package-lock.json package.json search_index.json
$ cd _book
~/honkit-dir-made-by-me/_book$ python -m http.server 1234
项目地址:https://github.com/honkit/honkit
No comments:
Post a Comment