Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 3.3 KB

File metadata and controls

59 lines (39 loc) · 3.3 KB
description Embed your documentation in your product or website using the Docs Embed.
icon window-restore

Embed in your product

The Docs Embed is a powerful window into your product knowledge that you can add to any product or website. Users can ask their questions to the GitBook Assistant or browse your docs directly, without leaving your product. You can open the Embed with a button, put it in any component you want, or control it completely programatically.

Embed GitBook Assistant into your product or website

Embed your docs into your product or website

Overview

The Docs Embed consists of multiple tabs that get shown automatically, depending on your site's configuration:

  • Assistant: The GitBook Assistant - an AI-powered chat interface to help users find answers
  • Docs: A browser for navigating your documentation site

You can customize and override the default configuration with custom actions, tools, suggested questions, Authenticated Access, and more.

Get started

{% stepper %} {% step %} Prerequisites

Before embedding your docs, ensure:

  1. Your docs are published and accessible at a URL (e.g., https://docs.company.com).
  2. You have retrieved the embed script URL from your site settings (Settings → AI & MCP → Embed).

{% hint style="info" %} If you want to use the Assistant tab, GitBook Assistant must be enabled for your docs site (Settings → AI & MCP). {% endhint %} {% endstep %}

{% step %} Implementation

Pick the approach that matches your setup:

:code:

Standalone script tagDrop in a <script> tag for the fastest setup, then customize its appearancescript.md

:box:

Node.js/NPMInstall via NPM for server-side rendering or build-time controlnodejs.md

:react:

React componentUse prebuilt React components for seamless integrationreact.md

{% hint style="info" %} If your docs use Authenticated Access, follow the steps in how to set up the embed with authenticated docs. {% endhint %} {% endstep %}

{% step %} Configuration

Further reading

For the complete API reference and source code, see the @gitbook/embed package on GitHub.