diff --git a/v2/buildDocsForProduction b/v2/buildDocsForProduction index 63120ea46..c424fbb34 100755 --- a/v2/buildDocsForProduction +++ b/v2/buildDocsForProduction @@ -25,7 +25,6 @@ fi echo "Copying to supertokens-backend-website..." # remove unnecessary files -rm ./build/sitemap.xml rm ./build/index.html rm ./build/blog.html rm ./build/404.html diff --git a/v2/src/theme/TOC/index.js b/v2/src/theme/TOC/index.js index def41fac1..e7b231747 100644 --- a/v2/src/theme/TOC/index.js +++ b/v2/src/theme/TOC/index.js @@ -9,6 +9,7 @@ import clsx from 'clsx'; import useTOCHighlight from '@theme/hooks/useTOCHighlight'; import styles from './styles.module.css'; import { getUIModeFromStorage, updateUIMode } from "../../components/preBuiltOrCustomUISwitcher"; +import { useLocation } from '@docusaurus/router'; const LINK_CLASS_NAME = 'table-of-contents__link'; const ACTIVE_LINK_CLASS_NAME = 'table-of-contents__link--active'; const TOP_OFFSET = 100; @@ -47,17 +48,18 @@ function Headings({ toc, isChild }) { ); } -const OldDocsDisclaimer = () => { +function OldDocsDisclaimer() { + const location = useLocation(); const goToVersioningPage = () => { window.location.href = "/docs/community/versioning"; } - if (window.location.href.includes("/docs/guides")) { - return <>; + if (location.pathname.includes("/docs/guides")) { + return
; } - if (window.location.href.includes("/docs/community/versioning")) { - return <>; + if (location.pathname.includes("/docs/community/versioning")) { + return
; } return ( @@ -147,7 +149,7 @@ function TOC({ toc, showUISwitcher }) { const unselectedBorderColorString = "var(--ui-selector-inactive-border)"; return (
- {/* */} +