Convert Figma logo to code with AI

GitbookIO logogitbook

The open source frontend for GitBook doc sites

26,949
3,849
26,949
35

Top Related Projects

27,539

🃏 A magical documentation site generator.

19,243

Project documentation with Markdown.

22,531

📝 Minimalistic Vue-powered static site generator

Easy to maintain open source documentation websites.

36,008

Beautiful static documentation for your API

The source code that powers readthedocs.org

Quick Overview

GitBook is an open-source documentation platform that allows users to create and manage documentation using Markdown or AsciiDoc. It provides a simple and elegant way to write and publish documentation, books, and knowledge bases, with support for versioning, multi-language content, and integrations with various tools and services.

Pros

  • Easy to use and set up, with a user-friendly interface for both writers and readers
  • Supports multiple formats (Markdown, AsciiDoc) and offers flexible customization options
  • Provides built-in versioning and multi-language support
  • Offers integrations with popular tools and services (GitHub, Google Analytics, etc.)

Cons

  • Limited advanced formatting options compared to some other documentation platforms
  • Can be resource-intensive for large documentation projects
  • Some users report occasional syncing issues between local and online versions
  • The learning curve for more advanced features and customizations can be steep for beginners

Getting Started

To get started with GitBook, follow these steps:

  1. Install GitBook CLI:
npm install -g gitbook-cli
  1. Create a new book:
gitbook init my-book
cd my-book
  1. Edit the README.md and SUMMARY.md files to add your content and structure.

  2. Build and serve your book locally:

gitbook serve
  1. Access your book at http://localhost:4000

For more advanced usage and configuration options, refer to the official GitBook documentation.

Competitor Comparisons

27,539

🃏 A magical documentation site generator.

Pros of docsify

  • Lightweight and fast, with no build process required
  • Highly customizable with plugins and themes
  • Supports multiple languages and full-text search out of the box

Cons of docsify

  • Limited built-in features compared to Gitbook's extensive ecosystem
  • Less suitable for complex documentation structures or large-scale projects
  • Requires more manual configuration and setup

Code Comparison

docsify:

<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css">
</head>
<body>
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: 'My Docs',
      repo: 'https://github.com/username/repo'
    }
  </script>
  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
</body>
</html>

Gitbook:

{
  "title": "My Book",
  "description": "This is my book",
  "structure": {
    "readme": "README.md",
    "summary": "SUMMARY.md"
  },
  "plugins": ["highlight", "search"],
  "pluginsConfig": {
    "highlight": {
      "defaultLanguage": "javascript"
    }
  }
}
19,243

Project documentation with Markdown.

Pros of MkDocs

  • Lightweight and fast, with minimal dependencies
  • Highly customizable through themes and plugins
  • Supports Markdown extensions for enhanced functionality

Cons of MkDocs

  • Less intuitive for non-technical users
  • Limited built-in features compared to GitBook
  • Requires more manual configuration for advanced setups

Code Comparison

MkDocs configuration (mkdocs.yml):

site_name: My Documentation
theme: material
plugins:
  - search
  - minify

GitBook configuration (book.json):

{
  "title": "My Documentation",
  "plugins": ["search", "theme-default"],
  "structure": {
    "readme": "README.md"
  }
}

Both MkDocs and GitBook are popular documentation tools, but they cater to different user needs. MkDocs is more developer-friendly and offers greater flexibility, while GitBook provides a more user-friendly interface and integrated publishing platform. The choice between the two depends on the specific requirements of your project and the technical expertise of your team.

22,531

📝 Minimalistic Vue-powered static site generator

Pros of VuePress

  • Built on Vue.js, offering a more flexible and customizable framework
  • Better performance and faster build times for large documentation sites
  • Supports Vue components in Markdown for enhanced interactivity

Cons of VuePress

  • Steeper learning curve, especially for those unfamiliar with Vue.js
  • Less extensive plugin ecosystem compared to GitBook
  • May require more configuration for complex documentation structures

Code Comparison

GitBook:

structure:
  readme: README.md
  summary: SUMMARY.md

VuePress:

module.exports = {
  themeConfig: {
    sidebar: [
      '/',
      '/guide/',
      '/config/'
    ]
  }
}

Both GitBook and VuePress are popular documentation generators, but they cater to different needs. GitBook offers a more user-friendly approach with its WYSIWYG editor and extensive plugin ecosystem, making it ideal for non-technical users and simple documentation projects. VuePress, on the other hand, provides greater flexibility and performance, making it suitable for developers who want more control over their documentation sites and are comfortable with Vue.js. The choice between the two depends on the specific requirements of your project and your team's technical expertise.

Easy to maintain open source documentation websites.

Pros of Docusaurus

  • Built with React, offering more flexibility and customization options
  • Supports versioning of documentation out-of-the-box
  • Integrates well with other Facebook open-source projects

Cons of Docusaurus

  • Steeper learning curve for non-developers
  • Less intuitive for content creators who prefer a WYSIWYG interface
  • May require more setup and configuration compared to Gitbook

Code Comparison

Docusaurus (config.js):

module.exports = {
  title: 'My Documentation',
  tagline: 'A sample documentation site',
  url: 'https://your-docusaurus-site.com',
  baseUrl: '/',
  onBrokenLinks: 'throw',
  favicon: 'img/favicon.ico',
  // ... more configuration options
};

Gitbook (book.json):

{
  "title": "My Documentation",
  "description": "A sample documentation site",
  "plugins": ["theme-default", "search"],
  "structure": {
    "readme": "README.md"
  }
}

Both Gitbook and Docusaurus are popular documentation tools, but they cater to different user needs. Gitbook is more user-friendly for non-technical users, while Docusaurus offers greater flexibility and integration with React-based projects. The choice between the two depends on the specific requirements of your documentation project and the technical expertise of your team.

36,008

Beautiful static documentation for your API

Pros of Slate

  • More customizable and flexible for advanced users
  • Better suited for API documentation with a three-column layout
  • Supports multiple programming languages in code samples

Cons of Slate

  • Steeper learning curve, especially for non-technical users
  • Requires more setup and configuration compared to GitBook
  • Limited built-in themes and customization options for beginners

Code Comparison

Slate (Ruby):

require 'middleman'
require 'middleman-syntax'
require 'middleman-autoprefixer'
require 'middleman-sprockets'
require 'rouge'
require 'nokogiri'

GitBook (JavaScript):

const GitBook = require("gitbook");
const book = new GitBook();

book.parse().then(() => {
  console.log("Book successfully parsed!");
});

Slate uses Ruby and Middleman for static site generation, while GitBook is built on Node.js and focuses on a more user-friendly approach. Slate's code structure is geared towards developers comfortable with Ruby and static site generators, whereas GitBook's API is designed to be more accessible to a wider range of users, including those with less technical expertise.

The source code that powers readthedocs.org

Pros of Read the Docs

  • Open-source and self-hostable, allowing for greater customization and control
  • Supports multiple documentation formats (reStructuredText, Markdown, etc.)
  • Integrates well with version control systems like Git

Cons of Read the Docs

  • Steeper learning curve, especially for non-technical users
  • Less visually appealing default themes compared to GitBook
  • Limited built-in collaboration features

Code Comparison

Read the Docs (Python):

from recommonmark.parser import CommonMarkParser

source_parsers = {
    '.md': CommonMarkParser,
}

source_suffix = ['.rst', '.md']

GitBook (JavaScript):

module.exports = {
  title: 'My Book',
  plugins: ['highlight', 'theme-default'],
  structure: {
    readme: 'README.md',
    summary: 'SUMMARY.md'
  }
};

Both repositories offer documentation solutions, but they cater to different audiences. Read the Docs is more suitable for technical projects and developers who prefer greater control and customization. GitBook, on the other hand, provides a more user-friendly interface and is better suited for non-technical users or teams looking for a simpler documentation solution with collaborative features.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

GitBook

Docs - Community - Developer Docs - Changelog - Bug reports

Documented on GitBook

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

  • Node.js (Version: >=18.x)
  • Bun

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

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.

Other development commands

  • bun format: format the code
  • bun lint: lint the code

CI and testing

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

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.

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.

NPM DownloadsLast 30 Days