Compare commits

..

1 Commits

Author SHA1 Message Date
Nicolas Dorseuil b307b09acd Add urlLookup parameter to restrict URL lookup alternatives 2026-07-28 13:00:10 +02:00
827 changed files with 7369 additions and 21620 deletions
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix "View activity" disclosure in AI Chat not opening after the Base UI migration.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Respect page description visibility settings in HTML and full-page Markdown output.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Scroll to an in-page heading even when the URL hash is unchanged (e.g. clicking the same anchor again).
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop showing previously asked questions as suggestions in the GitBook Assistant
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add an assistant tool to rate its own previous response when the user reacts to it.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Simplify carousel overflow with symmetric edge masks and visible-item paging. Replaces complex negative-margin bleed logic with transparent edge fades and page-by-visible-item scrolling.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep the breadcrumbs from covering the page actions' hit area.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Include published page descriptions in the page's Markdown output.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Bump Next.js to 16.3.3.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Chunk oversized visitor auth cookies to fix an infinite redirect loop when the visitor token exceeds the browser cookie size limit.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Fix inline Ask AI buttons opening a configured custom assistant.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop the built-in cookie banner from flashing on sites using a consent integration such as Osano or OneTrust.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix breadcrumbs for cross-space page links in grouped sites.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show the theme toggle in the footer whenever the outline column that hosts the other toggle isn't pinned open, so it stays reachable on laptop-sized screens in wide layouts and while the AI chat is open.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Disable click-to-zoom for inline line sized images.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix host action buttons in the Docs Embed not reaching the assistant.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the Docs Embed widget rendering with a dark surface when the visitor's OS is in dark mode, even on a light page or a site published with a light theme. The embed script now accepts `?theme=light|dark` to force a scheme.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix suggested question clicks in the embed search not opening the assistant.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix switching from the Search tab to the Docs or Assistant tab in the embed doing nothing.
-5
View File
@@ -1,5 +0,0 @@
---
"@gitbook/embed": patch
---
Make the Docs Embed widget match the page it is embedded in rather than the visitor's OS: a widget on a light page stays light even when the visitor's system is in dark mode, and the widget's own chrome and the docs inside it always render in the same scheme. Sites published with a single theme impose it on the widget too, since they render in it regardless. The standalone script takes `?theme=light` on its URL, and calling `init` twice now updates the options instead of throwing.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": minor
---
Support external links in published site navigation.
-7
View File
@@ -1,7 +0,0 @@
---
"gitbook": patch
---
Introduce client-side content selection (`select`): a site-wide, recency-ordered list of selected slugs, persisted in localStorage and shareable via `?select=`, applied to `<html>` before first paint so the right variant renders with no flash. All variants stay server-rendered, so pages are byte-identical for every visitor (no cache impact).
Tabs now use it: switching a tab activates its slug, and every tab group offering that slug follows, across pages. Tabs no longer write to the URL fragment (`#` returns to anchors only); deep-links into a tab still activate and scroll to it.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Skip internal paths (`~gitbook/*`, `.well-known/oauth-protected-resource`, `llms.txt`, `robots.txt`, `sitemap.xml`, `rss.xml`) when building URL lookup alternatives, to avoid resolving URLs that can never match content.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep published search results within the selected site-space scope during local and remote result fusion.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix page link titles showing the site section name instead of the target space title.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Update the URL hash when a tab is selected, so a copied link scrolls back to that tab
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Self-host default Google fonts and inline only the @font-face rules of the fonts a site uses, instead of shipping render-blocking stylesheets covering all 23 families on every page.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Hide card fields that render no content, along with their title
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Upgrade react-hotkeys-hook to v5 and use its native `useKey` option so keyboard shortcuts match the produced key on non-QWERTY layouts.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Keep embed demos and frames on the deployment that served them.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix a hydration mismatch on every page load caused by the AI chat time-based greeting being computed in the server timezone.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Lazy-load the Mermaid code block so pages that have code blocks but no diagram no longer ship its rendering dependencies.
-8
View File
@@ -1,8 +0,0 @@
---
"@gitbook/react-openapi": major
"gitbook": patch
---
Lazy load the Scalar API client modal and stop preloading the Scalar runtime. The modal is now code-split into its own chunk, fetched in parallel with the runtime only when a reader clicks "Test it", and a spinner is shown on the button until the client opens.
Breaking: the package no longer ships the modal in its main entry — consumers must serve the emitted `ScalarApiModal` chunk and use a bundler that supports dynamic `import()`, and the Scalar runtime is no longer preloaded on page load. The internal `preloadScalarRuntime` helper is removed.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop preloading the zoom-modal variant of every zoomable image at render time; it downloaded each image twice during the initial page load. The modal image still loads on hover or click.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Serve an indexable `X-Robots-Tag` on markdown pages requested by AI agents
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Bump `@gitbook/api` to 0.199.0, and record a markdown request made from the page actions menu as a page action rather than an agent request.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the page-actions dropdown closing before the "Copied" confirmation could be shown when copying the MCP server URL, an MCP install command, or the page as Markdown.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Mermaid diagrams no longer hijack page scrolling: zooming with the wheel now requires holding Ctrl/Cmd inline, while the fullscreen view keeps free wheel zoom.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Migrate the headless UI primitives from Radix and react-aria to Base UI.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Persist content selection (tabs and other `select` blocks) in localStorage only, dropping the `?select=` query parameter from the URL. A tab click still writes the tab's hash, so a copied URL lands on that tab and reactivates it on load.
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Redesign the site OAuth consent screen for published sites MCP and translate its strings
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Drop a column instead of shrinking them all when a section group dropdown runs out of room
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Let a section group dropdown scroll when it is taller than the screen
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the variant switcher linking to the wrong URL for non-default variants of the default section
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Skip the rendering work for off-screen OpenAPI blocks, so pages with many operations stay smooth to scroll.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Improve cookie handling in the OpenAPI "Test it" request proxy.
@@ -1,6 +0,0 @@
---
"gitbook": patch
"@gitbook/react-openapi": minor
---
Keep the OpenAPI renderer out of the initial bundle of pages that have no OpenAPI block, by building its context on the client behind a dynamic boundary.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix OpenAPI webhook payload and schema example panels being clipped instead of scrollable.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Move paragraph block styles behind a single `paragraph` class and drop the `page-cover-background:` gate from the cover-contrast text. The gate combined with the per-paragraph `:not(:has(...))` made every DOM insertion re-style all paragraphs, which froze very long pages.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Serve Markdown responses to ChatGPT with a `text/plain` Content-Type for compatibility.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Preserve external page destinations returned by published search.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Use one canonical backend-ranked result set for published searches across site sections.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Preserve canonical backend ranking and present page or section context that matches each published search destination.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Align the Previous page navigation button to the left edge and the Next button to the right edge, including when only one of them is present.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix pages resolving to "not found" when a root URL lookup resolves to a custom homepage, by no longer using the homepage pathname as a prefix for the requested page path.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep current-space search results inside revision previews.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Prewarm published search caches when readers open the search interface.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Inject site tracking scripts (analytics integrations) after `load` + idle instead of preloading them and executing them during the critical loading window.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Render horizontal and vertical merged table cells on published pages.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix text disappearing in Firefox and iOS Safari on pages with a background cover
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Render a site-space custom home page at its placement root while preserving the full space and normal page URLs.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Resolve stable page, space and file refs in images, definitions and HTML blocks of published markdown pages, instead of leaking internal `/pages/{id}`, `/spaces/{id}` and `/files/{id}` URLs.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fail closed in `/~gitbook/revalidate` when `GITBOOK_SECRET` is not configured, returning `403 Revalidation is disabled` instead of skipping the signature check, consistent with `force-revalidate`.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the docs embed not applying `?theme=light`/`?theme=dark`. The theme was dropped when the embed redirected to its default tab, and the embed tabs couldn't read it because they render statically (their request headers are empty). The middleware now threads a forced embed theme through the embed route context (scoped to the embed, not the main site), so the embed tabs honor it while staying statically rendered, and the redirect forwards it to the default tab. The forced theme is also persisted to the embed's own theme storage so it is remembered across tab navigation instead of only applying while the query string is present.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the search field losing focus if it was focused just before the page finished hydrating.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix code block syntax highlighting so comment delimiters (e.g. `//`, `/*`) use the same color as the rest of the comment. Previously the delimiter fell through to the generic punctuation scope, making it a different color from the comment body (most visible in dark mode).
@@ -1,5 +0,0 @@
---
"@gitbook/react-contentkit": patch
---
Show a close button on ContentKit modals rendered on published sites.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Scroll to the top when selecting a search result for the page already being viewed.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add end-to-end coverage for root and nested external links in site section navigation.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix section links in search results opening the page without scrolling to the section.
-5
View File
@@ -1,5 +0,0 @@
---
'gitbook': patch
---
Allow published search to be scoped to any visible site section.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the spacebar being ignored in the search bar, which made multi-word queries impossible.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep keyboard focus within search while the results are open.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Link page-level search matches to the top of the page while preserving section anchors for section matches.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show the containing section name when hovering a direct link to a space.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the section group menu dismissing while the mouse is still inside it, when the collapsed sidebar rail overlaps the menu on no-sidebar pages.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show loose sections in a section group dropdown as secondary links unless the group starts with one
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Stop the section tabs in the header from showing a scroll button and faded edge when all tabs already fit.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Keep Shiki out of the initial page bundle by splitting the highlighter from the plain-text token helpers, so client code no longer pulls the engine and language bundles in through a shared import.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Use cached Git metadata (via @gitbook/api 0.201.0's `cachedMetadata` param) when rendering Edit on Git actions.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Render headings with the site's heading font when one is configured, falling back to the main font otherwise.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the tabs "more" dropdown showing when no tab is overflowing, and stop a tab click re-rendering every tab group on the page.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Show image thumbnails, including SVG previews, for file attachments on published sites.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Make the table search "no results" empty state more prominent with vertical spacing so it no longer blends into the content below.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix search results from a previous scope staying stuck on top of the new results when switching the search filter.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix tabs nested inside another tab group rendering an empty body once a tab in the outer group was selected.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Load the admin toolbar and its CSS lazily so published pages no longer ship a render-blocking stylesheet for admin-only UI.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Remove the gap between the columns of a section group dropdown holding a large group
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Remove the fallback query parameter after successful page navigation without adding a browser history entry.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Restore Edit on Git page actions for Git-synced pages.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Support localized custom AI Assistant greeting subtitles.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix the first item of a table-of-contents page group appearing cut off (faded under the group header) after client-side navigation.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Highlight a table-of-contents link entry as active when it points to the page — or the section of a page — you are currently viewing.
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Fix chevrons and open-state styling incorrectly reacting to a tooltip opening on the same trigger, by switching from the shared Base UI `data-popup-open` attribute to `aria-expanded`.
-6
View File
@@ -1,6 +0,0 @@
---
"gitbook": patch
"@gitbook/react-contentkit": patch
---
Support query params in the `@webframe.navigate` action.
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Only track embed view events once the frame is actually shown to the reader
-5
View File
@@ -1,5 +0,0 @@
---
"gitbook": patch
---
Add the `select` action to InlineButton. Clicking the button activates its slug, so any block containing that slug switches to it.
-10
View File
@@ -1,10 +0,0 @@
# Stop editors from looking for .editorconfig files in parent directories.
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
max_line_length = 100
+3
View File
@@ -0,0 +1,3 @@
# Changes to the API data cache functions can invalidate all existing data cache
# causing a massive amount of revalidation, impacting our API.
packages/gitbook/src/lib/data/api.ts @SamyPesse
+1 -4
View File
@@ -76,10 +76,7 @@ bun dev
```
Additional development commands:
- `bun lint`: Lint the code using Oxlint
- `bun lint:fix`: Automatically fix lint issues using Oxlint
- `bun format`: Format the code using Oxfmt
- `bun format:check`: Check formatting without changing files
- `bun format`: Format the code using Biome
- `bun typecheck`: Run TypeScript type checking
- `bun unit`: Run unit tests
- `bun e2e`: Run end-to-end tests

Some files were not shown because too many files have changed in this diff Show More