From 89fcbcc6e4a19f591d84bc58a539e16e5621fb84 Mon Sep 17 00:00:00 2001
From: Paul Gottschling
Date: Tue, 20 May 2025 15:45:16 -0400
Subject: [PATCH] Fix home page link on the 404 page
Use the `useBaseUrl` hook to link to `/docs/` in the production site.
Otherwise, the current approach directs users to `goteleport.com`, which
is incorrect.
---
src/theme/NotFound/Content/index.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/theme/NotFound/Content/index.tsx b/src/theme/NotFound/Content/index.tsx
index 536756d..2df7fef 100644
--- a/src/theme/NotFound/Content/index.tsx
+++ b/src/theme/NotFound/Content/index.tsx
@@ -12,6 +12,7 @@ import {
nearestAvailableCategoryIndex,
} from "/src/utils/suggestions";
import Search from "/src/components/Search";
+import useBaseUrl from "@docusaurus/useBaseUrl";
export default function NotFoundContent({ className }: Props): ReactNode {
const { pathname } = useLocation();
@@ -80,7 +81,7 @@ export default function NotFoundContent({ className }: Props): ReactNode {
{"."}
- Go back to the docs home page.
+ Go back to the docs home page.