Skip to content

Comments

fix(nx-dev): update breadcrumb links to match sidebar#34500

Merged
barbados-clemens merged 1 commit intomasterfrom
cu/DOC-400-breadcrumbs
Feb 18, 2026
Merged

fix(nx-dev): update breadcrumb links to match sidebar#34500
barbados-clemens merged 1 commit intomasterfrom
cu/DOC-400-breadcrumbs

Conversation

@barbados-clemens
Copy link
Contributor

@barbados-clemens barbados-clemens commented Feb 18, 2026

navigation of the breadcrumbs could lead to confusing state since they were based around the folder structure.

Breadcrumbs are now based around the sidebar structure so they match the hierarchy of content.

Note: I left the existing index file based route pages in place in case there are any links people have booked marked/linked to in other locations. these will get cleaned up when we finally rewrite all the URLs to their new content locations

@barbados-clemens barbados-clemens requested a review from a team as a code owner February 18, 2026 16:35
@nx-cloud
Copy link
Contributor

nx-cloud bot commented Feb 18, 2026

View your CI Pipeline Execution ↗ for commit 45833d2

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 6m 40s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 3m 56s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-18 22:22:53 UTC

@barbados-clemens barbados-clemens self-assigned this Feb 18, 2026
@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 45833d2
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/699639180b86e70008b24ff3
😎 Deploy Preview https://deploy-preview-34500--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added new component to handle instead of making the index card component dual purposed atm. felt easier to maintain for the different impl needs.

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 45833d2
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6996391892262e000714e661
😎 Deploy Preview https://deploy-preview-34500--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@nx-cloud nx-cloud bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

At least one additional CI pipeline execution has run since the conclusion below was written and it may no longer be applicable.

Nx Cloud is proposing a fix for your failed CI:

We've fixed the broken breadcrumb link by removing the URL construction logic for sidebar groups. The previous implementation was generating links like /docs/reference/devkit/ngcli-adapter using a slugify function that converted underscores to dashes, but the actual URLs use underscores (e.g., /docs/reference/devkit/ngcli_adapter). Now, only actual sidebar link entries (which have correct hrefs from the sidebar configuration) will be clickable in breadcrumbs, while group labels appear as non-clickable text.

Warning

We could not verify this fix.

Suggested Fix changes
diff --git a/astro-docs/src/components/layout/Breadcrumbs.astro b/astro-docs/src/components/layout/Breadcrumbs.astro
index 202690b60d..dc8f20f0cd 100644
--- a/astro-docs/src/components/layout/Breadcrumbs.astro
+++ b/astro-docs/src/components/layout/Breadcrumbs.astro
@@ -8,36 +8,24 @@ type Crumb = {
   current: boolean;
 };
 
-function slugify(label: string): string {
-  return label
-    .replace(/\.NET/g, 'dotnet')
-    .toLowerCase()
-    .replace(/[^a-z0-9]+/g, '-')
-    .replace(/^-+|-+$/g, '');
-}
-
 // --- Primary: Sidebar-based breadcrumbs ---
 const sidebar = Astro.locals.starlightRoute.sidebar;
 
 function findBreadcrumbPath(
   entries: typeof sidebar,
-  path: Crumb[] = [],
-  slugSegments: string[] = []
+  path: Crumb[] = []
 ): Crumb[] | null {
   for (const entry of entries) {
     if (entry.type === 'link' && entry.isCurrent) {
       return [...path, { label: entry.label, href: entry.href, current: true }];
     }
     if (entry.type === 'group') {
-      const currentSlugs = [...slugSegments, slugify(entry.label)];
-      const groupHref = `/docs/${currentSlugs.join('/')}`;
       const result = findBreadcrumbPath(
         entry.entries,
         [
           ...path,
-          { label: entry.label, href: groupHref, current: false },
-        ],
-        currentSlugs
+          { label: entry.label, href: undefined, current: false },
+        ]
       );
       if (result) return result;
     }

Apply fix via Nx Cloud  Reject fix via Nx Cloud


Or Apply changes locally with:

npx nx-cloud apply-locally ND8C-O5Uj

Apply fix locally with your editor ↗   View interactive diff ↗


🎓 Learn more about Self-Healing CI on nx.dev

@barbados-clemens barbados-clemens force-pushed the cu/DOC-400-breadcrumbs branch 2 times, most recently from a555e97 to b10921e Compare February 18, 2026 20:53
@barbados-clemens barbados-clemens enabled auto-merge (squash) February 18, 2026 22:01
@barbados-clemens barbados-clemens merged commit 7528cc5 into master Feb 18, 2026
24 checks passed
@barbados-clemens barbados-clemens deleted the cu/DOC-400-breadcrumbs branch February 18, 2026 22:23
FrozenPandaz pushed a commit that referenced this pull request Feb 20, 2026
navigation of the breadcrumbs could lead to confusing state since they
were based around the folder structure.

Breadcrumbs are now based around the sidebar structure so they match the
hierarchy of content.

Note: I left the existing index file based route pages in place in case
there are any links people have booked marked/linked to in other
locations. these will get cleaned up when we finally rewrite all the
URLs to their new content locations

(cherry picked from commit 7528cc5)
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.

2 participants