This commit is contained in:
Dan Abramov
2023-02-05 22:39:41 +00:00
parent a5842f9adf
commit fc6def5668

View File

@@ -39,6 +39,7 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
const title = meta.title || route?.title || '';
const description = meta.description || route?.description || '';
const isHomePage = cleanedPath === '/';
const isBlogIndex = cleanedPath === '/blog';
let content;
if (isHomePage) {
@@ -67,16 +68,14 @@ export function Page({children, toc, routeTree, meta, section}: PageProps) {
}
let hasColumns = true;
if (section === 'home') {
hasColumns = false;
}
let showSidebar = true;
let showToc = true;
if (section === 'home' || section === 'blog') {
if (isHomePage || isBlogIndex) {
hasColumns = false;
showSidebar = false;
}
if (cleanedPath === '/blog') {
showToc = false;
} else if (section === 'blog') {
showSidebar = false;
}
return (