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 安装依赖,启动开发服务器,然后在浏览器里打开任意已发布的 GitBook 网站,并在地址前加上 examples: 前缀——你对代码的修改会实时显示在浏览器里。
在这之前我需要安装什么?需要 Node.js >= 22.3(推荐用 nvm 来管理版本)和 Bun >= 1.2.15,因为项目使用的文本格式锁文件在旧版 Bun 上无法读取。
我能用它自托管文档,从而不用 GitBook 的托管服务吗?技术上可以,但 GitBook 明确不建议这么做:你得自己负责可靠性、维护以及合并后续更新,而且自托管实例不保证获得支持。
这个许可证有什么需要注意的地方吗?它采用 GNU GPLv3:如果你分发代码,就必须公开自己的源代码;把代码克隆到私有仓库则需要购买商业许可证。
GitBook 为什么开源了渲染器,却不鼓励别人分叉?是为了让社区直接改进产品:分叉或自托管会把合并后续更新的负担压在你自己身上,而 GitBook 无法为这些实例保证支持或维护。
自托管时,字体和图标有什么限制吗?有:GitBook Open 使用 Font Awesome,出于许可证方面的原因,本地和自托管环境应只使用免费版中的图标。
他们如何防止渲染器出现功能倒退?每个拉取请求在合并之前都会自动通过视觉测试和性能测试,以便尽早发现渲染和速度方面的倒退。
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