Skip to content

fix: Change logo navigation to use client-side routing for same-site URLs#2277

Draft
raethlo wants to merge 2 commits intomasterfrom
claude/fix-docs-logo-redirect-9WutP
Draft

fix: Change logo navigation to use client-side routing for same-site URLs#2277
raethlo wants to merge 2 commits intomasterfrom
claude/fix-docs-logo-redirect-9WutP

Conversation

@raethlo
Copy link
Contributor

@raethlo raethlo commented Feb 24, 2026

preface: seems reasonable, but I am not sure at all if the fix is the correct thing to do 🕵🏻

When I click the logo in the API reference
image
I get a broken redirect to gh pages url (https://apify.github.io/apify-docs/apify-docs/)
image

Summary

  • Logo click on docs.apify.com was redirecting to apify.github.io/apify-docs/apify-docs/ with broken CSS
  • Root cause: full page navigation through nginx → GitHub Pages proxy leaks the upstream URL
  • Fix: use client-side routing () when logo href matches the site's own URL
  • Sub-sites (SDK, CLI) where baseUrl !== '/' still navigate to docs.apify.com as before

https://claude.ai/code/session_018xWQw8L3okDraDit7BYXHn

When the logo href matches the site's own URL (e.g. https://docs.apify.com
on docs.apify.com), use React Router client-side navigation instead of a
full page reload. This prevents the upstream GitHub Pages URL from leaking
through the nginx reverse proxy, which caused users clicking the logo to
be redirected to apify.github.io/apify-docs/apify-docs/ with broken CSS.

For sub-sites (SDK, CLI, etc.) where baseUrl !== '/', the logo still
performs a full page navigation to the main docs site as before.

https://claude.ai/code/session_018xWQw8L3okDraDit7BYXHn
@apify-service-account
Copy link

Preview for this PR was built for commit 56cf4e1 and is ready at https://pr-2277.preview.docs.apify.com!

@raethlo raethlo changed the title Fix logo navigation to use client-side routing for same-site URLs fix: Change logo navigation to use client-side routing for same-site URLs Feb 26, 2026
@apify-service-account
Copy link

Preview for this PR was built for commit 5ab98572 and is ready at https://pr-2277.preview.docs.apify.com!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants