+ ) : null
+ }
diff --git a/packages/gitbook/src/components/PageBody/PageBodyBlankslate.tsx b/packages/gitbook/src/components/PageBody/PageBodyBlankslate.tsx
index 1bf4a8428..6eb6c039b 100644
--- a/packages/gitbook/src/components/PageBody/PageBodyBlankslate.tsx
+++ b/packages/gitbook/src/components/PageBody/PageBodyBlankslate.tsx
@@ -71,11 +71,13 @@ export async function PageBodyBlankslate(props: {
className={tcls(
'grid',
'max-w-3xl',
+ 'page-width-wide:max-w-screen-2xl',
'w-full',
'mx-auto',
'gap-4',
'grid-cols-1',
- 'sm:grid-cols-2'
+ 'sm:grid-cols-2',
+ 'page-width-wide:md:grid-cols-3'
)}
>
{pageElements}
diff --git a/packages/gitbook/src/components/PageBody/PageCover.tsx b/packages/gitbook/src/components/PageBody/PageCover.tsx
index 9c8113e8d..5e52ddf8a 100644
--- a/packages/gitbook/src/components/PageBody/PageCover.tsx
+++ b/packages/gitbook/src/components/PageBody/PageCover.tsx
@@ -95,7 +95,7 @@ export async function PageCover(props: {
: [
'sm:mx-auto',
'max-w-3xl ',
- 'page-full-width:max-w-screen-2xl',
+ 'page-width-wide:max-w-screen-2xl',
'sm:rounded-md',
'mb-8',
]
diff --git a/packages/gitbook/src/components/PageBody/PageFooterNavigation.tsx b/packages/gitbook/src/components/PageBody/PageFooterNavigation.tsx
index 465eb81ca..1e9df3be2 100644
--- a/packages/gitbook/src/components/PageBody/PageFooterNavigation.tsx
+++ b/packages/gitbook/src/components/PageBody/PageFooterNavigation.tsx
@@ -34,7 +34,7 @@ export async function PageFooterNavigation(props: {
'mt-6',
'gap-2',
'max-w-3xl',
- 'page-full-width:max-w-screen-2xl',
+ 'page-width-wide:max-w-screen-2xl',
'mx-auto',
'text-tint'
)}
diff --git a/packages/gitbook/src/components/PageBody/PageHeader.tsx b/packages/gitbook/src/components/PageBody/PageHeader.tsx
index b5e0f1bf3..6b96faac0 100644
--- a/packages/gitbook/src/components/PageBody/PageHeader.tsx
+++ b/packages/gitbook/src/components/PageBody/PageHeader.tsx
@@ -3,7 +3,7 @@ import { isAIChatEnabled } from '@/components/utils/isAIChatEnabled';
import type { GitBookSiteContext } from '@/lib/context';
import type { AncestorRevisionPage } from '@/lib/pages';
import { tcls } from '@/lib/tailwind';
-import { type RevisionPageDocument, SiteVisibility } from '@gitbook/api';
+import type { RevisionPageDocument } from '@gitbook/api';
import { Icon } from '@gitbook/icons';
import { PageIcon } from '../PageIcon';
import { StyledLink } from '../primitives';
@@ -22,11 +22,17 @@ export async function PageHeader(props: {
const withAIChat = isAIChatEnabled(context);
+ const pageActions = context.customization.pageActions ?? {
+ // TODO: After 25/07/2025, we can remove this default values as the cache will be updated
+ markdown: true,
+ externalAI: true,
+ };
+
return (
- {page.layout.tableOfContents ? (
+ {page.layout.tableOfContents &&
+ // Show page actions if *any* of the actions are enabled
+ (withAIChat || pageActions.markdown || pageActions.externalAI) ? (
) : null}
diff --git a/packages/gitbook/src/components/PageBody/PreservePageLayout.tsx b/packages/gitbook/src/components/PageBody/PreservePageLayout.tsx
index 06a801034..834224982 100644
--- a/packages/gitbook/src/components/PageBody/PreservePageLayout.tsx
+++ b/packages/gitbook/src/components/PageBody/PreservePageLayout.tsx
@@ -6,14 +6,14 @@ import * as React from 'react';
* This approach is needed as page layout (full width block) is done using CSS (`body:has(.full-width)`),
* which becomes false while transitioning between the 2 page states:
*
- * 1. Page 1 with full width block: `body:has(.site-full-width)` is true
- * 2. Loading skeleton while transitioning to page 2: `body:has(.site-full-width)` is false
- * 3. Page 2 with full width block: `body:has(.site-full-width)` is true
+ * 1. Page 1 with full width block: `body:has(.site-width-wide)` is true
+ * 2. Loading skeleton while transitioning to page 2: `body:has(.site-width-wide)` is false
+ * 3. Page 2 with full width block: `body:has(.site-width-wide)` is true
*
* This component ensures that the layout is preserved while transitioning between the 2 page states (in step 2).
*/
-export function PreservePageLayout(props: { asFullWidth: boolean }) {
- const { asFullWidth } = props;
+export function PreservePageLayout(props: { siteWidthWide: boolean }) {
+ const { siteWidthWide } = props;
React.useLayoutEffect(() => {
// We use the header as it's an element preserved between page transitions
@@ -23,12 +23,12 @@ export function PreservePageLayout(props: { asFullWidth: boolean }) {
return;
}
- if (asFullWidth) {
- header.classList.add('site-full-width');
+ if (siteWidthWide) {
+ header.classList.add('site-width-wide');
} else {
- header.classList.remove('site-full-width');
+ header.classList.remove('site-width-wide');
}
- }, [asFullWidth]);
+ }, [siteWidthWide]);
return null;
}
diff --git a/packages/gitbook/src/components/SitePage/SitePageSkeleton.tsx b/packages/gitbook/src/components/SitePage/SitePageSkeleton.tsx
index 7b840afbb..2f18c0b8c 100644
--- a/packages/gitbook/src/components/SitePage/SitePageSkeleton.tsx
+++ b/packages/gitbook/src/components/SitePage/SitePageSkeleton.tsx
@@ -19,7 +19,7 @@ export function SitePageSkeleton() {
'lg:items-start'
)}
>
-
+
diff --git a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx
index 0c0efdb1e..f57aec64c 100644
--- a/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx
+++ b/packages/gitbook/src/components/SpaceLayout/SpaceLayout.tsx
@@ -97,7 +97,7 @@ export function SpaceLayout(props: {
'flex-col',
'lg:flex-row',
CONTAINER_STYLE,
- 'site-full-width:max-w-full',
+ 'site-width-wide:max-w-full',
// Ensure the footer is display below the viewport even if the content is not enough
withFooter && 'min-h-[calc(100vh-64px)]',
diff --git a/packages/gitbook/src/components/layout.ts b/packages/gitbook/src/components/layout.ts
index 6a9b39a98..4f6579ab6 100644
--- a/packages/gitbook/src/components/layout.ts
+++ b/packages/gitbook/src/components/layout.ts
@@ -14,7 +14,6 @@ export const CONTAINER_STYLE: ClassValue = [
'md:px-8',
'max-w-screen-2xl',
'mx-auto',
- // 'site-full-width:max-w-full',
];
/**
diff --git a/packages/gitbook/tailwind.config.ts b/packages/gitbook/tailwind.config.ts
index a895b5271..fa5266945 100644
--- a/packages/gitbook/tailwind.config.ts
+++ b/packages/gitbook/tailwind.config.ts
@@ -564,9 +564,9 @@ const config: Config = {
/**
* Variant when the page contains a block that will be rendered in full-width mode.
*/
- addVariant('site-full-width', 'body:has(.site-full-width) &');
- addVariant('site-default-width', 'body:has(.site-default-width) &');
- addVariant('page-full-width', 'body:has(.page-full-width) &');
+ addVariant('site-width-wide', 'body:has(.site-width-wide) &');
+ addVariant('site-width-default', 'body:has(.site-width-default) &');
+ addVariant('page-width-wide', 'body:has(.page-width-wide) &');
/**
* Variant when the page is configured to hide the table of content.