<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <id>https://chattybox.ai/de/blog/</id>
    <title>ChattyBox Blog</title>
    <updated>2026-07-10T00:00:00.000Z</updated>
    <generator>https://github.com/jpmonette/feed</generator>
    <link rel="alternate" href="https://chattybox.ai/de/blog/"/>
    <subtitle>ChattyBox Blog</subtitle>
    <icon>https://chattybox.ai/de/img/favicon.svg</icon>
    <entry>
        <title type="html"><![CDATA[Add a Source-Cited AI Chatbot to Docusaurus 3]]></title>
        <id>https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/</id>
        <link href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/"/>
        <updated>2026-07-10T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A tested Docusaurus 3 integration pattern that survives client-side navigation, React development remounts, and restrictive content security policies.]]></summary>
        <content type="html"><![CDATA[<p>Docusaurus behaves like a single-page application after the first page load. A widget integration that only works on the initial document, or that appends a second loader on every route change, is not production-ready. This guide uses a stable script identity and a theme root that remains mounted across documentation routes.</p>
<!-- -->
<p><strong>Author and technical reviewer:</strong> <a href="https://github.com/MichaelFisher1997" target="_blank" rel="noopener noreferrer">Michael Fisher</a>, ChattyBox maintainer. Published and technically checked July 10, 2026. The repeatable checks below are an implementation tutorial, not a performance or accuracy benchmark.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="1-add-the-root-theme-component">1. Add the Root theme component<a href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/#1-add-the-root-theme-component" class="hash-link" aria-label="Direkter Link zu 1. Add the Root theme component" title="Direkter Link zu 1. Add the Root theme component" translate="no">​</a></h2>
<p>Create <code>src/theme/Root.tsx</code> in your Docusaurus site:</p>
<div class="language-tsx codeBlockContainer_hqe0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_AzKq"><pre tabindex="0" class="prism-code language-tsx codeBlock_ypHS thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_v7UJ"><div class="token-line" style="color:#F8F8F2"><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">import</span><span class="token plain"> </span><span class="token maybe-class-name">React</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> useEffect</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">type</span><span class="token plain"> </span><span class="token class-name">ReactNode</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">from</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'react'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> </span><span class="token constant" style="color:rgb(189, 147, 249)">WIDGET_ID</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'chattybox-widget'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">export</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">default</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">function</span><span class="token plain"> </span><span class="token function" style="color:rgb(80, 250, 123)">Root</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> children </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token operator">:</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"> children</span><span class="token operator">:</span><span class="token plain"> </span><span class="token maybe-class-name">ReactNode</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token function" style="color:rgb(80, 250, 123)">useEffect</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token arrow operator">=&gt;</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">if</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token dom variable" style="color:rgb(189, 147, 249);font-style:italic">document</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">getElementById</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token constant" style="color:rgb(189, 147, 249)">WIDGET_ID</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token plain"> </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">const</span><span class="token plain"> script </span><span class="token operator">=</span><span class="token plain"> </span><span class="token dom variable" style="color:rgb(189, 147, 249);font-style:italic">document</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">createElement</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token string" style="color:rgb(255, 121, 198)">'script'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">id</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token constant" style="color:rgb(189, 147, 249)">WIDGET_ID</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">src</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'https://chattybox.ai/widget.js'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">async</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token boolean">true</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">dataset</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">apiKey</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'YOUR_API_KEY'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">dataset</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">apiUrl</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'YOUR_CHAT_API_URL'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">dataset</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">chattyboxWidget</span><span class="token plain"> </span><span class="token operator">=</span><span class="token plain"> </span><span class="token string" style="color:rgb(255, 121, 198)">'true'</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token dom variable" style="color:rgb(189, 147, 249);font-style:italic">document</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token property-access">body</span><span class="token punctuation" style="color:rgb(248, 248, 242)">.</span><span class="token method function property-access" style="color:rgb(80, 250, 123)">appendChild</span><span class="token punctuation" style="color:rgb(248, 248, 242)">(</span><span class="token plain">script</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token punctuation" style="color:rgb(248, 248, 242)">,</span><span class="token plain"> </span><span class="token punctuation" style="color:rgb(248, 248, 242)">[</span><span class="token punctuation" style="color:rgb(248, 248, 242)">]</span><span class="token punctuation" style="color:rgb(248, 248, 242)">)</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token keyword" style="color:rgb(189, 147, 249);font-style:italic">return</span><span class="token plain"> </span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&lt;</span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&gt;</span><span class="token punctuation" style="color:rgb(248, 248, 242)">{</span><span class="token plain">children</span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&lt;/</span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&gt;</span><span class="token punctuation" style="color:rgb(248, 248, 242)">;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token punctuation" style="color:rgb(248, 248, 242)">}</span><br></div></code></pre></div></div>
<p>The stable <code>chattybox-widget</code> ID is the important part. React Strict Mode can remount effects during development, and Docusaurus changes routes without replacing the document. The guard makes both cases idempotent.</p>
<p>Use the API URL shown by your ChattyBox project rather than copying an example deployment. See the <a href="https://chattybox.ai/de/docs/widget/">widget installation reference</a> for the current attributes and the <a href="https://chattybox.ai/de/docusaurus-ai-chatbot/">Docusaurus product guide</a> for source-selection and evaluation guidance.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="2-keep-the-loader-mounted">2. Keep the loader mounted<a href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/#2-keep-the-loader-mounted" class="hash-link" aria-label="Direkter Link zu 2. Keep the loader mounted" title="Direkter Link zu 2. Keep the loader mounted" translate="no">​</a></h2>
<p>Do not put this script inside an individual docs page or layout that Docusaurus replaces during navigation. The swizzled <code>Root</code> component wraps the application for its lifetime, so the widget remains available as visitors move between guides and references.</p>
<p>If your site already has <code>src/theme/Root.tsx</code>, merge the effect into the existing component rather than replacing authentication, analytics, or other providers.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="3-account-for-content-security-policy">3. Account for Content Security Policy<a href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/#3-account-for-content-security-policy" class="hash-link" aria-label="Direkter Link zu 3. Account for Content Security Policy" title="Direkter Link zu 3. Account for Content Security Policy" translate="no">​</a></h2>
<p>A restrictive policy needs to allow:</p>
<ul>
<li class=""><code>https://chattybox.ai</code> in <code>script-src</code> for the widget loader.</li>
<li class="">Your configured chat API origin in <code>connect-src</code>.</li>
<li class=""><code>https://fonts.googleapis.com</code> in <code>style-src</code> and <code>https://fonts.gstatic.com</code> in <code>font-src</code> if the widget font is not already available.</li>
<li class="">Inline component styles in <code>style-src</code> for the current widget build.</li>
</ul>
<p>Start from your existing policy and add only the origins you actually use. Do not replace a restrictive policy with a broad wildcard.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="4-reproduce-the-integration-checks">4. Reproduce the integration checks<a href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/#4-reproduce-the-integration-checks" class="hash-link" aria-label="Direkter Link zu 4. Reproduce the integration checks" title="Direkter Link zu 4. Reproduce the integration checks" translate="no">​</a></h2>
<p>In your Docusaurus project, add the Root wrapper above and run:</p>
<div class="language-bash codeBlockContainer_hqe0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_AzKq"><pre tabindex="0" class="prism-code language-bash codeBlock_ypHS thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_v7UJ"><div class="token-line" style="color:#F8F8F2"><span class="token plain">bun install</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">bun run start</span><br></div></code></pre></div></div>
<p>Then verify:</p>
<ol>
<li class="">Open two different docs routes without a full browser refresh.</li>
<li class="">Run <code>document.querySelectorAll('#chattybox-widget').length</code> after each navigation. It must remain <code>1</code>.</li>
<li class="">Ask a question answered by an indexed page and confirm the response links to that page.</li>
<li class="">Ask an unsupported question and confirm the assistant falls back instead of inventing a source.</li>
<li class="">Test the launcher at a narrow mobile viewport and check that it does not cover navigation or pagination controls.</li>
</ol>
<p>The script-count check proves duplicate prevention. It does not prove retrieval quality. Use a representative question set and the <a href="https://chattybox.ai/de/docs/scraping/">scraping guide</a> to validate source coverage before launch.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="what-to-monitor-after-launch">What to monitor after launch<a href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/#what-to-monitor-after-launch" class="hash-link" aria-label="Direkter Link zu What to monitor after launch" title="Direkter Link zu What to monitor after launch" translate="no">​</a></h2>
<p>Record unresolved questions, incorrect citations, stale source pages, and routes where the launcher obscures site controls. Re-test after Docusaurus theme upgrades because changes to navigation and content layout can affect placement even when the loader remains correct.</p>
<p>For a broader rollout sequence, use the <a href="https://chattybox.ai/de/how-to-add-ai-chatbot-to-documentation/">documentation chatbot implementation checklist</a> and <a href="https://chattybox.ai/de/docs/launch-checklist/">launch checklist</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="sources">Sources<a href="https://chattybox.ai/de/blog/docusaurus-ai-chatbot-implementation/#sources" class="hash-link" aria-label="Direkter Link zu Sources" title="Direkter Link zu Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://chattybox.ai/docs/installation/" target="_blank" rel="noopener noreferrer">ChattyBox widget installation reference</a></li>
<li class=""><a href="https://docusaurus.io/docs/swizzling" target="_blank" rel="noopener noreferrer">Docusaurus swizzling documentation</a></li>
<li class=""><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP" target="_blank" rel="noopener noreferrer">MDN Content Security Policy guide</a></li>
</ul>]]></content>
        <author>
            <name>Michael Fisher</name>
            <uri>https://github.com/MichaelFisher1997</uri>
        </author>
        <category label="AI Chatbots" term="AI Chatbots"/>
        <category label="Documentation" term="Documentation"/>
        <category label="Implementation" term="Implementation"/>
        <category label="Docusaurus" term="Docusaurus"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[Add a Source-Cited AI Chatbot to MkDocs and Material]]></title>
        <id>https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/</id>
        <link href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/"/>
        <updated>2026-07-10T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[A reproducible MkDocs integration for Material instant navigation and the built-in MkDocs theme, with duplicate-loader, mobile, search, and CSP checks.]]></summary>
        <content type="html"><![CDATA[<p>MkDocs themes expose different override directories, and Material can navigate between pages without a complete reload. A durable integration must preserve the theme's existing scripts, load the widget once, and coexist with search and navigation on mobile.</p>
<!-- -->
<p><strong>Author and technical reviewer:</strong> <a href="https://github.com/MichaelFisher1997" target="_blank" rel="noopener noreferrer">Michael Fisher</a>, ChattyBox maintainer. Published and technically checked July 10, 2026. The verification protocol below is an implementation tutorial; no traffic, deflection, or answer-accuracy result is claimed.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="1-choose-the-correct-override-directory">1. Choose the correct override directory<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#1-choose-the-correct-override-directory" class="hash-link" aria-label="Direkter Link zu 1. Choose the correct override directory" title="Direkter Link zu 1. Choose the correct override directory" translate="no">​</a></h2>
<p>For Material for MkDocs, point <code>custom_dir</code> at an <code>overrides</code> directory:</p>
<div class="language-yaml codeBlockContainer_hqe0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_AzKq"><pre tabindex="0" class="prism-code language-yaml codeBlock_ypHS thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_v7UJ"><div class="token-line" style="color:#F8F8F2"><span class="token key atrule">site_name</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> My documentation</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token key atrule">theme</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token key atrule">name</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> material</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token key atrule">custom_dir</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> overrides</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token key atrule">features</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">    </span><span class="token punctuation" style="color:rgb(248, 248, 242)">-</span><span class="token plain"> navigation.instant</span><br></div></code></pre></div></div>
<p>For the built-in theme, use a separate custom theme directory:</p>
<div class="language-yaml codeBlockContainer_hqe0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_AzKq"><pre tabindex="0" class="prism-code language-yaml codeBlock_ypHS thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_v7UJ"><div class="token-line" style="color:#F8F8F2"><span class="token key atrule">site_name</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> My documentation</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain"></span><span class="token key atrule">theme</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token key atrule">name</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> mkdocs</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token key atrule">custom_dir</span><span class="token punctuation" style="color:rgb(248, 248, 242)">:</span><span class="token plain"> custom_theme</span><br></div></code></pre></div></div>
<p>Keeping the variants separate makes it clear which upstream base template is being extended.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="2-extend-the-scripts-block">2. Extend the scripts block<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#2-extend-the-scripts-block" class="hash-link" aria-label="Direkter Link zu 2. Extend the scripts block" title="Direkter Link zu 2. Extend the scripts block" translate="no">​</a></h2>
<p>Create <code>overrides/main.html</code> for Material or <code>custom_theme/main.html</code> for the built-in theme:</p>
<div class="language-html codeBlockContainer_hqe0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_AzKq"><pre tabindex="0" class="prism-code language-html codeBlock_ypHS thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_v7UJ"><div class="token-line" style="color:#F8F8F2"><span class="token plain">{% extends "base.html" %}</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">{% block scripts %}</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  {{ super() }}</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">  </span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&lt;</span><span class="token tag" style="color:rgb(255, 121, 198)">script</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">    </span><span class="token tag attr-name" style="color:rgb(241, 250, 140)">id</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(248, 248, 242)">=</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag attr-value" style="color:rgb(255, 121, 198)">chattybox-widget</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">    </span><span class="token tag attr-name" style="color:rgb(241, 250, 140)">src</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(248, 248, 242)">=</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag attr-value" style="color:rgb(255, 121, 198)">https://chattybox.ai/widget.js</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">    </span><span class="token tag attr-name" style="color:rgb(241, 250, 140)">async</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">    </span><span class="token tag attr-name" style="color:rgb(241, 250, 140)">data-api-key</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(248, 248, 242)">=</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag attr-value" style="color:rgb(255, 121, 198)">YOUR_API_KEY</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">    </span><span class="token tag attr-name" style="color:rgb(241, 250, 140)">data-api-url</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(248, 248, 242)">=</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag attr-value" style="color:rgb(255, 121, 198)">YOUR_CHAT_API_URL</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">    </span><span class="token tag attr-name" style="color:rgb(241, 250, 140)">data-chattybox-widget</span><span class="token tag attr-value punctuation attr-equals" style="color:rgb(248, 248, 242)">=</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag attr-value" style="color:rgb(255, 121, 198)">true</span><span class="token tag attr-value punctuation" style="color:rgb(248, 248, 242)">"</span><span class="token tag" style="color:rgb(255, 121, 198)"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token tag" style="color:rgb(255, 121, 198)">  </span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&gt;</span><span class="token script"></span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&lt;/</span><span class="token tag" style="color:rgb(255, 121, 198)">script</span><span class="token tag punctuation" style="color:rgb(248, 248, 242)">&gt;</span><span class="token plain"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">{% endblock %}</span><br></div></code></pre></div></div>
<p><code>{{ super() }}</code> preserves scripts provided by the theme, including navigation and search behavior. Omitting it can make the widget appear to work while silently breaking the documentation interface. The stable ID also gives you a direct duplicate-loader assertion.</p>
<p>Use project-specific values from the <a href="https://chattybox.ai/de/docs/widget/">widget installation reference</a>. The <a href="https://chattybox.ai/de/mkdocs-ai-chatbot/">MkDocs AI chatbot guide</a> covers source scope, crawl behavior, and the questions to evaluate before publishing.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="3-build-both-variants">3. Build both variants<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#3-build-both-variants" class="hash-link" aria-label="Direkter Link zu 3. Build both variants" title="Direkter Link zu 3. Build both variants" translate="no">​</a></h2>
<p>From your MkDocs project:</p>
<div class="language-bash codeBlockContainer_hqe0 theme-code-block" style="--prism-color:#F8F8F2;--prism-background-color:#282A36"><div class="codeBlockContent_AzKq"><pre tabindex="0" class="prism-code language-bash codeBlock_ypHS thin-scrollbar" style="color:#F8F8F2;background-color:#282A36"><code class="codeBlockLines_v7UJ"><div class="token-line" style="color:#F8F8F2"><span class="token plain">python -m venv .venv</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">. .venv/bin/activate</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">pip install -r requirements.txt</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">cd material</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">mkdocs build --strict</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain" style="display:inline-block"></span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">cd ../vanilla</span><br></div><div class="token-line" style="color:#F8F8F2"><span class="token plain">mkdocs build --strict</span><br></div></code></pre></div></div>
<p><code>--strict</code> turns warnings into failures, which catches broken navigation and configuration issues before the widget is evaluated.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="4-run-the-browser-checks">4. Run the browser checks<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#4-run-the-browser-checks" class="hash-link" aria-label="Direkter Link zu 4. Run the browser checks" title="Direkter Link zu 4. Run the browser checks" translate="no">​</a></h2>
<p>Serve each variant and verify:</p>
<ol>
<li class="">Built-in search still opens and returns the expected documentation result.</li>
<li class="">Material instant navigation changes routes without duplicating the widget loader.</li>
<li class=""><code>document.querySelectorAll('#chattybox-widget').length</code> remains <code>1</code> after several route changes.</li>
<li class="">At a 390 px viewport, the launcher does not cover search, navigation, or next/previous controls.</li>
<li class="">A supported question cites the expected page, and an unsupported question produces a conservative fallback.</li>
</ol>
<p>The first four checks validate integration behavior. The fifth depends on the pages you index and requires a representative evaluation set; follow the <a href="https://chattybox.ai/de/docs/scraping/">scraping guide</a> and <a href="https://chattybox.ai/de/docs/launch-checklist/">launch checklist</a> rather than treating a successful script load as proof of answer quality.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="5-preserve-a-restrictive-csp">5. Preserve a restrictive CSP<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#5-preserve-a-restrictive-csp" class="hash-link" aria-label="Direkter Link zu 5. Preserve a restrictive CSP" title="Direkter Link zu 5. Preserve a restrictive CSP" translate="no">​</a></h2>
<p>Allow the widget host in <code>script-src</code>, the configured API origin in <code>connect-src</code>, and the font origins in <code>style-src</code> and <code>font-src</code> when needed. The current widget injects component styles, so an otherwise strict policy also needs an explicit inline-style strategy. Avoid wildcard source lists.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="maintenance-checklist">Maintenance checklist<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#maintenance-checklist" class="hash-link" aria-label="Direkter Link zu Maintenance checklist" title="Direkter Link zu Maintenance checklist" translate="no">​</a></h2>
<p>Rebuild both theme variants after MkDocs or Material upgrades, because upstream template block names can change. Keep the script ID stable, preserve <code>super()</code>, and re-run the search, instant-navigation, mobile-overlap, and source-citation checks.</p>
<p>For end-to-end rollout planning, use the <a href="https://chattybox.ai/de/how-to-add-ai-chatbot-to-documentation/">documentation chatbot implementation checklist</a>.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="sources">Sources<a href="https://chattybox.ai/de/blog/mkdocs-ai-chatbot-implementation/#sources" class="hash-link" aria-label="Direkter Link zu Sources" title="Direkter Link zu Sources" translate="no">​</a></h2>
<ul>
<li class=""><a href="https://chattybox.ai/docs/installation/" target="_blank" rel="noopener noreferrer">ChattyBox widget installation reference</a></li>
<li class=""><a href="https://www.mkdocs.org/dev-guide/themes/" target="_blank" rel="noopener noreferrer">MkDocs theme customization</a></li>
<li class=""><a href="https://squidfunk.github.io/mkdocs-material/customization/" target="_blank" rel="noopener noreferrer">Material for MkDocs customization</a></li>
<li class=""><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP" target="_blank" rel="noopener noreferrer">MDN Content Security Policy guide</a></li>
</ul>]]></content>
        <author>
            <name>Michael Fisher</name>
            <uri>https://github.com/MichaelFisher1997</uri>
        </author>
        <category label="AI Chatbots" term="AI Chatbots"/>
        <category label="Documentation" term="Documentation"/>
        <category label="Implementation" term="Implementation"/>
        <category label="MkDocs" term="MkDocs"/>
    </entry>
    <entry>
        <title type="html"><![CDATA[ChattyBox für quellengestützte Website-Antworten]]></title>
        <id>https://chattybox.ai/de/blog/introducing-chattybox/</id>
        <link href="https://chattybox.ai/de/blog/introducing-chattybox/"/>
        <updated>2026-06-09T00:00:00.000Z</updated>
        <summary type="html"><![CDATA[Lernen Sie ChattyBox kennen, einen KI-Chatbot, der aus Ihrer öffentlichen Website und Dokumentation lernt und Besuchern mit Quellenangaben antwortet.]]></summary>
        <content type="html"><![CDATA[<p>ChattyBox hilft Teams, öffentliche Website-Inhalte, Dokumentationen, Help Center und CMS-Seiten in einen KI-Chatbot zu verwandeln, der fundierte Antworten mit Quellenangaben liefert. Statt aus allgemeinem Modellwissen zu antworten, crawlt er die von Ihnen ausgewählten Seiten und verweist Besucher auf die genauen Quellen hinter jeder Antwort.</p>
<!-- -->
<p>Das Produkt richtet sich an Teams, die eine praktische KI-Support-Ebene wollen, ohne ihre Dokumentation zu migrieren oder ihren Website-Stack neu aufzubauen. Fügen Sie Ihre Website-URL hinzu, lassen Sie ChattyBox veröffentlichte Inhalte crawlen, testen Sie echte Fragen und installieren Sie anschließend das Widget mit einem Script-Tag.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="warum-wir-es-entwickelt-haben">Warum wir es entwickelt haben<a href="https://chattybox.ai/de/blog/introducing-chattybox/#warum-wir-es-entwickelt-haben" class="hash-link" aria-label="Direkter Link zu Warum wir es entwickelt haben" title="Direkter Link zu Warum wir es entwickelt haben" translate="no">​</a></h2>
<p>Die meisten Website-Chatbots erfordern entweder eine aufwendige, vertriebsgetriebene Einrichtung oder antworten zu breit aus den Trainingsdaten des Modells. ChattyBox konzentriert sich auf die Inhalte, die Sie bereits veröffentlichen, sodass Besucher Fragen in natürlicher Sprache stellen und die Antwort trotzdem anhand Ihrer Dokumentation überprüfen können.</p>
<p>Das ist hilfreich für Dokumentationsseiten, SaaS-Help-Center, Entwicklerdokumentation, CMS-Seiten und Produktwebsites, bei denen Vertrauen wichtig ist.</p>
<h2 class="anchor anchorTargetStickyNavbar_MdcL" id="was-als-nächstes-kommt">Was als Nächstes kommt<a href="https://chattybox.ai/de/blog/introducing-chattybox/#was-als-n%C3%A4chstes-kommt" class="hash-link" aria-label="Direkter Link zu Was als Nächstes kommt" title="Direkter Link zu Was als Nächstes kommt" translate="no">​</a></h2>
<p>In diesem Blog teilen wir praktische Leitfäden dazu, wie KI Support-Tickets reduziert, zuverlässige RAG-Chatbots für Websites aufgebaut und KI-Assistenten in Dokumentationen integriert werden können, ohne die Kontrolle über die Quellen zu verlieren.</p>
<p>Beginnen Sie mit dem <a href="https://chattybox.ai/de/ai-chatbot-for-documentation/">Leitfaden zum Dokumentations-KI-Chatbot</a> oder lesen Sie die <a href="https://chattybox.ai/de/docs/installation/">Installationsdokumentation</a>, um ChattyBox zu Ihrer Website hinzuzufügen.</p>]]></content>
        <author>
            <name>ChattyBox Team</name>
            <uri>https://chattybox.ai/</uri>
        </author>
        <category label="AI Chatbots" term="AI Chatbots"/>
        <category label="Documentation" term="Documentation"/>
        <category label="Product" term="Product"/>
    </entry>
</feed>