docsy icon indicating copy to clipboard operation
docsy copied to clipboard

Hide Breadcrumb navigation from particular pages not the entire website

Open samiahmedsiddiqui opened this issue 3 years ago • 10 comments

  • Fix #983

samiahmedsiddiqui avatar Sep 29 '22 12:09 samiahmedsiddiqui

@chalin @LisaFC Please review.

samiahmedsiddiqui avatar Sep 29 '22 12:09 samiahmedsiddiqui

Hi. Breadcrumbs can be hidden using CSS. We don't need another config option, IMHO. I'll comment more soon (not before next week).

chalin avatar Sep 29 '22 14:09 chalin

@chalin Let's suppose I have 2,000 docs pages and I want to hide breadcrumb on 200 pages. How can I do that?

samiahmedsiddiqui avatar Sep 29 '22 15:09 samiahmedsiddiqui

@chalin Let's suppose I have 2,000 docs pages and I want to hide breadcrumb on 200 pages. How can I do that?

Hi @samiahmedsiddiqui. How would you do it within the scope of this PR? (I'm asking because it will better help me understand your use case, how you see it resolved, and whether there might be an alternative solution that is already available.)

chalin avatar Oct 07 '22 20:10 chalin

@chalin I am doing this by defining another parameter in page. If you add breadcrumbDisable: true in the file then the breadcrumb will be disable for that particular page.

samiahmedsiddiqui avatar Oct 10 '22 08:10 samiahmedsiddiqui

@chalin Please review the PR.

samiahmedsiddiqui avatar May 06 '24 06:05 samiahmedsiddiqui

@chalin @fekete-robert Just wanted to nudge about the PR. Any chance we can get it merged soon?

samiahmedsiddiqui avatar Jul 10 '24 07:07 samiahmedsiddiqui

Hey, I have tried the changes in my own docsy website, and after I see the result, I'm curious about when we need this feature. Let me explain with an example:

Say I have a _index.md page with the following front matter:

---
title: How-tos
breadcrumbDisable: true
---

When I navigate to this "How-tos" page, the breadcrumb is not displayed. This part is OK. Then I navigate to one of the child pages of this "How-tos" page, say "Apply for your API key", and this child page will display the breadcrumb like below:

My Docs / How-tos / Apply for your API key

So, the user can still see "How-tos" in the breadcrumb. This makes me curious: then why would we hide "How-tos" from the breadcrumb in the first place? After all, users can still see it from the child pages.

Hopefully I explain it clearly.

huanlin avatar Jul 26 '24 02:07 huanlin

@huanlin This pull request aims to selectively remove the breadcrumb navigation element from specific pages within the website, without affecting its display on other pages or child pages. As a concrete example, this change will prevent the breadcrumb from appearing on the Homepage, while still allowing it to be visible on all other pages, including those that link back to the Homepage as a parent.

samiahmedsiddiqui avatar Jul 29 '24 06:07 samiahmedsiddiqui