honkit

:book: HonKit is building beautiful books using Markdown - Fork of GitBook

Github星跟蹤圖

HonKit

HonKit is building beautiful books using GitHub/Git and Markdown.

HonKit Screenshot

Documentation and Demo

HonKit documentation is built by HonKit!

Quick Start

Installation

The best way to install HonKit is via NPM or Yarn.

$ npm init --yes
$ npm install honkit --save-dev

⚠️ Warning:

  • If you have installed honkit globally you must install each plugins rule globally as well
  • If you have installed honkit locally you must install each plugins locally as well

We recommend installing honkit locally.

Create a book

HonKit can set up a boilerplate book:

$ npx honkit init

If you wish to create the book into a new directory, you can do so by running honkit init ./directory

Preview and serve your book using:

$ npx honkit serve

Or build the static website using:

$ npx honkit build

You can start to write your book!

For more details, see HonKit's documentation.

Usage examples

HonKit can be used to create a book, public documentation, enterprise manual, thesis, research papers, etc.

You can find a list of real-world examples in the documentation.

Features

Fork of GitBook

HonKit is a fork of GitBook (Legacy).
GitBook (Legacy) is deprecated and inactive project.

HonKit aim to smooth migration from GitBook (Legacy) to HonKit.

Compatibility with GitBook

  • Almost plugins work without changes!
  • Support gitbook-plugin-* packages
    • You should install these plugins via npm or yarn
    • npm install gitbook-plugin-<example> --save-dev

Differences with GitBook

  • Node.js 14+ supports
  • Improve build/serve performance
    • honkit build: use file cache by default
    • honkit serve: 28.2s → 0.9s in examples/benchmark
    • Also, support --reload flag for force refresh
  • Improve plugin loading logic
    • Reduce cost of finding honkit-plugin-* and gitbook-plugin-*
    • Support honkit-plugin-* and @scope/honkit-plugin-* (GitBook does not support a scoped module)
  • Remove install command
    • Instead of it, just use npm install or yarn install
  • Remove global-npm dependency
    • You can use HonKit with another npm package manager like yarn
  • Update dependencies
    • Upgrade to nunjucks@2 etc...
    • It will reduce bug
  • TypeScript
  • Monorepo codebase
    • Easy to maintain
  • Docker support

Migration from GitBook

Replace gitbook-cli with honkit.

npm uninstall gitbook-cli
npm install honkit --save-dev

Replace gitbook command with honkit command.

  "scripts": {
-    "build": "gitbook build",
+    "build": "honkit build",
-    "serve": "gitbook serve"
+    "serve": "honkit serve"
  },

After that, HonKit just work!

Benchmarks

honkit build benchmark:

Licensing

HonKit is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

HonKit is a fork of GitBook (Legacy).
GitBook is licensed under the Apache License, Version 2.0.

Also, HonKit includes bignerdranch/gitbook works.

Sponsors

主要指標

概覽
名稱與所有者honkit/honkit
主編程語言TypeScript
編程語言JavaScript (語言數: 7)
平台
許可證Apache License 2.0
所有者活动
創建於2020-06-13 12:16:48
推送於2025-05-24 12:52:44
最后一次提交2025-05-24 21:50:44
發布數69
最新版本名稱v6.0.3 (發布於 2025-05-01 04:35:09)
第一版名稱v3.3.0 (發布於 2020-06-15 00:31:34)
用户参与
星數3.2k
關注者數33
派生數241
提交數3.4k
已啟用問題?
問題數181
打開的問題數60
拉請求數229
打開的拉請求數1
關閉的拉請求數30
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?