-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(theme-classic): fix breadcrumb home link bug with new useHomePageRoute() hook #6749
Conversation
✔️ [V2] 🔨 Explore the source changes: 64579f7 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/621665eecc5ad3000817ef43 😎 Browse the preview: https://deploy-preview-6749--docusaurus-2.netlify.app |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6749--docusaurus-2.netlify.app/ |
Size Change: +358 B (0%) Total Size: 782 kB
ℹ️ View Unchanged
|
@slorber Might be a dumb idea, but how about instead of removing it fully, giving the user an option to set a home URL? Maybe in the config file... |
That is an idea, but IMHO it's better if sites have a homepage so maybe we should encourage to have one instead? We have other places where we link to this homepage, including the navbar logo: const logoLink = useBaseUrl(logo.href || '/'); |
That's a point. |
@slorber what about sites with |
@pranabdas you are right it's a silly mistake 😅 will fix it on Wednesday unless someone wants to handle it before |
Motivation
See also #6517 (comment)
Breadcrumbs link to the home by default:
Sometimes a site does not have a homepage, so it's not possible to link by default to
/
from the breadcrumbs home icon (lead to broken links error).In such cases we can simply remove the home item from breadcrumbs, until we find a better solution (see suggestions in #6517 (comment))
Have you read the Contributing Guidelines on pull requests?
yes
Test Plan
unit tests + local tests without home page or with docs/blog-only-home