From 1dcc1f0e697e922cc05096aaacadd9372f33613d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Olender?= <92638966+TC-MO@users.noreply.github.com> Date: Mon, 18 May 2026 10:11:24 +0200 Subject: [PATCH] fix: skip alternate markdown link on /search page /search is in the llms-txt plugin's excludeRoutes, so no /search.md counterpart is generated. The Layout was still rendering , producing a daily lychee 404 report on docs.apify.com/search.md. Skip the alternate link for /search, matching the existing handling for /404 and versioned pages. --- apify-docs-theme/src/theme/Layout/index.jsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apify-docs-theme/src/theme/Layout/index.jsx b/apify-docs-theme/src/theme/Layout/index.jsx index 37b0f25896..f88f13fd38 100644 --- a/apify-docs-theme/src/theme/Layout/index.jsx +++ b/apify-docs-theme/src/theme/Layout/index.jsx @@ -26,9 +26,12 @@ export default function LayoutWrapper(props) { pluginData.versions?.some((version) => !version.isLast && pathname.startsWith(version.path)), ); - const shouldRenderAlternateLink = currentPath && currentPath !== '404' && !isVersionedPage; + const shouldRenderAlternateLink = + currentPath && currentPath !== '404' && currentPath !== 'search' && !isVersionedPage; - const alternateMarkdownLink = useBaseUrl(`/${currentPath}.md`, { absolute: true }); + const alternateMarkdownLink = useBaseUrl(`/${currentPath}.md`, { + absolute: true, + }); return ( <>