From 4cf70c0468be74f19783bec96fa8ee2044132f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jind=C5=99ich=20B=C3=A4r?= Date: Mon, 1 Sep 2025 15:14:44 +0200 Subject: [PATCH] chore: remove broken `.md` links --- apify-docs-theme/src/theme/Layout/index.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apify-docs-theme/src/theme/Layout/index.jsx b/apify-docs-theme/src/theme/Layout/index.jsx index 2ca67c8a9d..3b7dd04889 100644 --- a/apify-docs-theme/src/theme/Layout/index.jsx +++ b/apify-docs-theme/src/theme/Layout/index.jsx @@ -9,12 +9,17 @@ import React from 'react'; export default function LayoutWrapper(props) { const { options: { subNavbar } } = usePluginData('@apify/docs-theme'); const baseUrl = useBaseUrl('/'); - const currentPath = useLocation().pathname.replace(new RegExp(`^${baseUrl}`), ''); + const currentPath = useLocation().pathname.replace(new RegExp(`^${baseUrl}`), '').trim(); + const shouldRenderAlternateLink = currentPath && currentPath !== '404'; return ( <> - + { + shouldRenderAlternateLink + ? + : null + }