diff --git a/src/components/DocsFooter.tsx b/src/components/DocsFooter.tsx index 5f2330e7eae..22a07818904 100644 --- a/src/components/DocsFooter.tsx +++ b/src/components/DocsFooter.tsx @@ -19,31 +19,37 @@ function areEqual(prevProps: DocsPageFooterProps, props: DocsPageFooterProps) { export const DocsPageFooter = memo( function DocsPageFooter({nextRoute, prevRoute, route}) { - if (!route || route?.heading) { + if (!route || route?.heading || !route.path || route.path === '/blog') { return null; } + let next; + let prev; + if (route.path.indexOf('/blog') === 0) { + next = prevRoute; + prev = nextRoute; + } else { + next = nextRoute; + prev = prevRoute; + } + return ( <> - {prevRoute?.path || nextRoute?.path ? ( + {prev?.path || next?.path ? ( <>
- {prevRoute?.path ? ( + {prev?.path ? ( ) : (
)} - {nextRoute?.path ? ( - + {next?.path && next.path !== '/blog' ? ( + ) : (
)} diff --git a/src/components/Layout/Page.tsx b/src/components/Layout/Page.tsx index c3224e5174a..060b5523cd9 100644 --- a/src/components/Layout/Page.tsx +++ b/src/components/Layout/Page.tsx @@ -52,6 +52,7 @@ export function Page({ cleanedPath, routeTree ); + const title = meta.title || route?.title || ''; const version = meta.version; const description = meta.description || route?.description || ''; @@ -86,13 +87,11 @@ export function Page({ {children}
- {!isBlogIndex && ( - - )} +
);