diff --git a/src/theme/Root.tsx b/src/theme/Root.tsx
index ab3417469e..721a911b1c 100644
--- a/src/theme/Root.tsx
+++ b/src/theme/Root.tsx
@@ -1,13 +1,17 @@
import React from 'react';
import Berry from '../components/Berry';
import { useLocation } from '@docusaurus/router';
+import { useHomePageRoute } from '@docusaurus/theme-common/internal';
export default function Root({ children }: { children: React.ReactNode }) {
const location = useLocation();
+ const homePageRoute = useHomePageRoute();
+ const isHomePage = homePageRoute?.path === location.pathname;
+
return (
<>
{children}
- {location.pathname !== '/' && }
+ {!isHomePage && }
>
);
}