Skip to content

Commit 7d46394

Browse files
authored
Fix home page link on the 404 page (#224)
Use the `useBaseUrl` hook to link to `/docs/` in the production site. Otherwise, the current approach directs users to `goteleport.com`, which is incorrect.
1 parent 6bf7a09 commit 7d46394

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/theme/NotFound/Content/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
nearestAvailableCategoryIndex,
1313
} from "/src/utils/suggestions";
1414
import Search from "/src/components/Search";
15+
import useBaseUrl from "@docusaurus/useBaseUrl";
1516

1617
export default function NotFoundContent({ className }: Props): ReactNode {
1718
const { pathname } = useLocation();
@@ -80,7 +81,7 @@ export default function NotFoundContent({ className }: Props): ReactNode {
8081
{"."}
8182
</p>
8283
<p>
83-
<a href="/">Go back to the docs home page.</a>
84+
<a href={useBaseUrl("/")}>Go back to the docs home page.</a>
8485
</p>
8586
</div>
8687
</div>

0 commit comments

Comments
 (0)