gitbook README

The project's README from github.com/GitbookIO/gitbook. As one markdown file: README.md.

GitBook

GitBook

Docs - Community - Developer Docs - Changelog - Bug reports - Feature requests

Welcome to GitBook, the platform for managing technical knowledge for teams.

This repository contains the open source code used to render GitBook's published content.

GitBook Open Published Site

Table of Contents

Getting Started

To run a local version of this project, please follow these simple steps.

Prerequisites

Set up

  1. Clone the repo into a public GitHub repository. If you plan to distribute the code, keep the source code public to comply with GNU GPLv3. To clone in a private repository, acquire a commercial license.
git clone https://github.com/gitbookIO/gitbook.git
  1. Ensure you are using the project's version of node. Running nvm use will change your local version to the correct one.

  2. Install the project's dependencies through Bun.

bun install
  1. Start your local development server.
bun dev
  1. Open a published GitBook space in your web browser, prefixing it with http://localhost:3000/url.

examples:

Any published GitBook site can be accessed through your local development instance, and any updates you make to the codebase will be reflected in your browser.

CI and testing

All pull-requests will be tested against both visual and performances testing to prevent regressions.

Fonts and Icons

GitBook Open uses fontawesome. For self-hosting and local development, for licensing reasons, only the icons from the free version should be used.

Contributing

GitBook's rendering engine is fully open source and built on top of Next.js. Head to our contributing guide to learn how to report bugs and suggest changes.

Types of contributions

We encourage you to contribute to GitBook to help us build the best tool for documenting technical knowledge. If you're looking for some quick ways to contribute, continue reading to learn more about popular contributions.

Translations

The GitBook UI is rendered using a set of translation files found in packages/gitbook/src/intl/translations. Spotted a wrong or missing translation? Open an issue and let us know.

Bugs

Encounter a bug? Open an issue with as much detail as you can. Clear reports help us fix things faster for everyone.

Deployment

[!WARNING]
While it is possible to self-host this project, we do not recommend this unless you are certain this option fits your need.

Looking for a specific feature in GitBook? Head to our contributing guide to suggest it.

Self-hosting this project puts the responsibility of maintaining and merging future updates on you. We cannot guarantee support, maintenance, or updates to forked and self-hosted instances of this project.

We want to make it as easy as possible for our community to collaborate and push the future of GitBook, which is why we encourage you to share your ideas with us instead of creating your own version.

This project allows you to self-host the rendering portion of your GitBook published content. Self-hosting has pros and cons.

On the pro side, you can customize the look and feel of your content, and better embed your documentation in your application.

On the con side, you become responsible for the reliability of your published site, and keeping the renderer up-to-date with the changes made to the GitBook platform.

License

Distributed under the GNU GPLv3 License.

If you plan to distribute the code, you must make the source code public to comply with the GNU GPLv3. To clone in a private repository, acquire a commercial license.

See LICENSE for more information.

The @gitbook/embed package is an exception: it is distributed under the Apache License 2.0, so it can be used in proprietary applications.

Badges

[![GitBook](https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1)](https://www.gitbook.com/preview?utm_source=gitbook_readme_badge&utm_medium=organic&utm_campaign=preview_documentation&utm_content=link)
<a href="https://www.gitbook.com/preview?utm_source=gitbook_readme_badge&utm_medium=organic&utm_campaign=preview_documentation&utm_content=link">
    <img
        src="https://img.shields.io/static/v1?message=Documented%20on%20GitBook&logo=gitbook&logoColor=ffffff&label=%20&labelColor=5c5c5c&color=3F89A1"
    />
</a>

Acknowledgements

GitBook wouldn't be possible without these projects:

Contributors

Legacy GitBook (Deprecated)

Our previous version of GitBook and it's CLI tool are now deprecated. You can still view the old repository and it's commits on this branch.

gitbook (GitbookIO/gitbook)

Searching Database…

What is this?The open source frontend that renders GitBook doc sites: this repo contains the code GitBook uses to render published content, while authoring stays on the GitBook platform.
So is this all of GitBook, or just the part readers see?Just the rendering side — the web frontend built on Next.js that displays published GitBook content. You can self-host only this rendering portion, not the whole product.
How do I run it locally?Clone the repo, run nvm use to get the right Node, install dependencies with Bun, start the dev server, then open any published GitBook site prefixed with examples: — your code changes show up live in the browser.
What do I need installed before that?Node.js >= 22.3 (nvm is recommended for managing it) and Bun >= 1.2.15, because the project uses a text-based lockfile that older Bun versions can't read.
Can I just self-host my docs with this and skip GitBook's hosting?Technically yes, but GitBook explicitly discourages it: you become responsible for reliability, maintenance and merging future updates, with no guaranteed support for self-hosted instances.
Anything tricky about the license?It's GNU GPLv3: if you distribute the code you must keep your source public, and cloning it into a private repository requires acquiring a commercial license.
Why did GitBook open-source the renderer but discourage forks?So the community improves the product directly: forking or self-hosting puts the burden of merging future updates on you, and GitBook can't guarantee support or maintenance for those instances.
Are there restrictions on fonts and icons when self-hosting?Yes: GitBook Open uses Font Awesome, and for licensing reasons local and self-hosted setups should only use icons from the free version.
How do they keep the renderer from regressing?Every pull request is automatically run through both visual and performance testing before it lands, to catch rendering and speed regressions early.
What are similar projects?fumadocs, onlook, NotionNext, crm, zuse, nextra, quarkdown, blinko
Creator
GitbookIO
Size
363.2 MB
Stars
29.1K
Age
12y
Commits · 90 Days