diff --git a/beta/src/components/Layout/Page.tsx b/beta/src/components/Layout/Page.tsx index 81be37b46..08fe22ee9 100644 --- a/beta/src/components/Layout/Page.tsx +++ b/beta/src/components/Layout/Page.tsx @@ -18,6 +18,7 @@ import type {TocItem} from 'components/MDX/TocContext'; import type {RouteItem} from 'components/Layout/getRouteMeta'; import {HomeContent} from './HomeContent'; import {TopNav} from './TopNav'; +import cn from 'classnames'; import(/* webpackPrefetch: true */ '../MDX/CodeBlock/CodeBlock'); @@ -75,6 +76,8 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) { showSidebar = false; showToc = false; } else if (section === 'blog') { + showToc = false; + hasColumns = false; showSidebar = false; } @@ -88,29 +91,29 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) { breadcrumbs={breadcrumbs} />
-
-
- {showSidebar && ( + className={cn( + hasColumns && + 'grid grid-cols-only-content lg:grid-cols-sidebar-content 2xl:grid-cols-sidebar-content-toc', + section === 'blog' && 'max-w-5xl mx-auto' + )}> + {showSidebar && ( +
+
- )} +
-
+ )} {/* No fallback UI so need to be careful not to suspend directly inside. */}
{content}
-
+