HonKit: A Fork of GitBook

栏目: IT技术 · 发布时间: 5年前

内容简介:HonKit is building beautiful books using GitHub/Git and Markdown.HonKit documentation is built by HonKit!

HonKit

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

HonKit: A Fork of GitBook

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

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 .

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
    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-plguin-* (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

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


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

产品经理的20堂必修课

产品经理的20堂必修课

徐建极 / 人民邮电出版社 / 2013-9-1 / 59.00元

《产品经理的20堂必修课》以作者八年的产品经理工作实践为基础,通过系统的理论结合丰富的实例的方法,全面地总结了作为一名互联网产品经理所应掌握的知识。 《产品经理的20堂必修课》分为三大部分。 讲产品:深入剖析互联网产品成功的要素,分别从需求导向、简单原则、产品运营、战略布局等维度,分析如何让产品在残酷的互联网竞争中脱颖而出。 讲方法:着重分析优秀的产品团队运作的工作方法和程序,详......一起来看看 《产品经理的20堂必修课》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具

html转js在线工具
html转js在线工具

html转js在线工具