MCPcopy
hub / github.com/honkit/honkit

github.com/honkit/honkit @v6.2.2 sqlite

repository ↗ · DeepWiki ↗ · release v6.2.2 ↗
1,162 symbols 3,305 edges 659 files 502 documented · 43%
README

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 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.

Docker support

Honkit provide docker image at ghcr.io/honkit/honkit.

This docker image includes built-in dependencies for PDF/epub.

docker pull ghcr.io/honkit/honkit
docker run -v `pwd`:`pwd` -w `pwd` --rm -it ghcr.io/honkit/honkit honkit build
docker run -v `pwd`:`pwd` -w `pwd` --rm -it ghcr.io/honkit/honkit honkit pdf

For more details, see docker/.

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 an inactive project.

HonKit aims to smooth the migration from GitBook (Legacy) to HonKit.

Compatibility with GitBook

  • Almost all 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 npm or yarn
  • Update dependencies
    • Upgrade to nunjucks@2, highlight.js etc...
    • It will reduce bugs
  • TypeScript
    • Rewritten by 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 works!

Examples of migration:

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

Deploys by Netlify

Extension points exported contracts — how you extend this code

BuildGenerator (Interface)
(no doc)
packages/honkit/src/BuildGenerator.ts
Matchers (Interface)
(no doc)
packages/honkit/src/types/jest.d.ts
Expect (Interface)
(no doc)
packages/honkit/src/types/jest.d.ts
InverseAsymmetricMatchers (Interface)
(no doc)
packages/honkit/src/types/jest.d.ts
WatchOptions (Interface)
(no doc)
packages/honkit/src/cli/watch.ts

Core symbols most depended-on inside this repo

resolve
called by 90
packages/honkit/src/models/fs.ts
create
called by 66
packages/honkit/src/models/fs.ts
toText
called by 63
packages/@honkit/markup-it/src/markup.ts
getPath
called by 55
packages/honkit/src/models/file.ts
getFile
called by 40
packages/honkit/src/models/page.ts
getName
called by 38
packages/honkit/src/models/plugin.ts
getTitle
called by 37
packages/honkit/src/models/readme.ts
getLogger
called by 33
packages/honkit/src/models/book.ts

Shape

Function 591
Method 400
Class 166
Interface 5

Languages

TypeScript100%

Modules by API surface

packages/honkit/src/models/book.ts32 symbols
packages/honkit/src/models/plugin.ts19 symbols
packages/honkit/src/models/summaryArticle.ts18 symbols
packages/honkit/src/models/fs.ts18 symbols
packages/@honkit/theme-default/src/js/theme/navigation.js18 symbols
packages/honkit/src/models/summary.ts17 symbols
packages/honkit/src/models/config.ts17 symbols
packages/honkit/src/models/parser.ts16 symbols
packages/honkit/src/utils/promise.ts15 symbols
packages/honkit/src/models/templateBlock.ts15 symbols
packages/honkit/src/models/output.ts15 symbols
packages/honkit/src/utils/fs.ts14 symbols

Dependencies from manifests, versioned

@eslint/js9.39.4 · 1×
@honkit/asciidocworkspace:* · 1×
@honkit/cleaning-toolsworkspace:* · 1×
@honkit/honkit-plugin-fontsettingsworkspace:* · 1×
@honkit/honkit-plugin-highlightworkspace:* · 1×
@honkit/honkit-plugin-theme-defaultworkspace:* · 1×
@honkit/htmlworkspace:* · 1×
@honkit/internal-test-utilsworkspace:* · 1×
@honkit/markdown-legacyworkspace:* · 1×
@honkit/markup-itworkspace:* · 1×
@relmify/jest-serializer-strip-ansi1.0.2 · 1×
@stylistic/eslint-plugin-js2.9.0 · 1×

For agents

$ claude mcp add honkit \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact