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 more about the workflow on adding your first Pull Request.

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. We welcome all additional translations for the UI.

Bugs

Encounter a bug or find an issue you'd like to fix? Helping us fix issues related to GitBook greatly improves the experience for everyone. Head to the issues section of this repository to learn more about the types of bugs you can already help out with.

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 to add a specific feature in GitBook? Head to our contributing guide to get started.

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 contribute to our product directly 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.

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…

29.1K ·GitHub
Что это такое?Открытый фронтенд, с помощью которого отображаются сайты документации GitBook: в этом репозитории лежит код, который GitBook использует для показа опубликованного контента, а создание документации остаётся на платформе GitBook.
Так это весь GitBook или только та часть, которую видят читатели?Только часть, отвечающая за отображение, — веб-фронтенд на Next.js, который показывает опубликованный контент GitBook. Самостоятельно можно развернуть именно этот рендерящий компонент, а не весь продукт целиком.
Как запустить это у себя локально?Склонируйте репозиторий, выполните nvm use, чтобы получить нужную версию Node, установите зависимости через Bun, запустите dev-сервер, а затем откройте любой опубликованный сайт GitBook с префиксом examples: — ваши изменения в коде сразу появятся в браузере.
Что нужно установить заранее?Node.js >= 22.3 (для управления версиями рекомендуется nvm) и Bun >= 1.2.15, потому что проект использует текстовый lockfile, который старые версии Bun прочитать не могут.
Могу ли я просто захостить свою документацию с помощью этого и обойтись без хостинга GitBook?Технически да, но GitBook прямо не рекомендует так делать: ответственность за надёжность, поддержку и слияние будущих обновлений ляжет на вас, а для самостоятельно развёрнутых экземпляров гарантированной поддержки нет.
Есть ли подводные камни в лицензии?Это GNU GPLv3: если вы распространяете код, то обязаны открывать исходники, а клонирование его в приватный репозиторий требует покупки коммерческой лицензии.
Почему GitBook открыл код рендерера, но не приветствует форки?Чтобы сообщество улучшало продукт напрямую: форк или самостоятельный хостинг перекладывает на вас бремя слияния будущих обновлений, и GitBook не может гарантировать поддержку и обслуживание таких экземпляров.
Есть ли ограничения по шрифтам и иконкам при самостоятельном хостинге?Да: в GitBook Open используется Font Awesome, и из лицензионных соображений в локальных и самостоятельно развёрнутых конфигурациях следует использовать только иконки из бесплатной версии.
Как они следят, чтобы рендерер не деградировал?Каждый pull request перед попаданием в основную ветку автоматически проходит и визуальное, и нагрузочное тестирование, чтобы заранее ловить регрессии в отрисовке и скорости.
What are similar projects?fumadocs, onlook, gollum, crm, zuse, NotionNext, blinko, quarkdown
Creator
GitbookIO
Size
362.2 MB
Stars
29.1K
Age
12y
Commits · 90 Days