Skip to content
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

May we get a dedicated breadcrumb meta tag? #85

Open
vaniwiki opened this issue Mar 26, 2024 · 14 comments
Open

May we get a dedicated breadcrumb meta tag? #85

vaniwiki opened this issue Mar 26, 2024 · 14 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@vaniwiki
Copy link

To better optimise for use cases like mine: I have a hierarchy based on books with chapters and texts.

My paths look like: books:bg:1:1

Which displays as Home > Bhagavad-gita > Bg. 1: Observing the Armies on the Battlefield > Bg. 1.1, as these are the unique names I have per page. You may notice that there are redundancies Bhagavad-gita / Bg. and chapter number.

This should be displayed as Home > Books > Bhagavad-gita > Chapter 1 > Text 1 (label, used in sidebar navigation),
or simply as Home > Books > Bg > 1 > 1 (path, default but gets overridden by the presence of name.)

At first I thought to suggest a setting, like <breadcrumb print="label" />, but then i thought why not add a dedicated breadbrumb meta tag? There are other plugins that does this (croissant), that I used extensively on tens of thousands of pages. I've discarded all other syntax in favor of a single json header for combo, but this is the only thing it doesn't do properly...

Anyhow, just thought to submit a ticket to the lottery... :-)

@gerardnico gerardnico added the enhancement New feature or request label Mar 27, 2024
@gerardnico
Copy link
Member

Hi Eiwind,

The navigation label is the name
All navigation component uses it.

We have already a component
Not sure what you are reffering with croissant.

@gerardnico gerardnico added the question Further information is requested label Mar 27, 2024
@vaniwiki
Copy link
Author

The croissant plugin lets you set unique breadcrumbs per page. I know that "name" is used in all navigation, but I need to be able to change that somehow. "Name" for breadcrumbs makes sense if you don't have very deep hierarchy, but in my use case it makes sense to make the breadcrumbs semantically correct, while still being able to keep "name" as a unique (short) identifier.

@gerardnico
Copy link
Member

What do you mean with to change that somehow ? Can you give an example of a deep hierarchy where the name is a problem?

@vaniwiki
Copy link
Author

In the sidebar I'm using "label" for navigation. My labels look like this: Chapter 1, Chapter 2, Chapter 3, Text 1, Text 2, Text 3 and so on. This makes sense if you know the book and which chapter you are reading. If I change "name" to this, then I lose my unique identifying name for the page. Sorry if I'm unable to express myself clearly...

@gerardnico
Copy link
Member

In your example : Home > Books > Bhagavad-gita > Chapter 1 > Text 1
The names are Home, Books, Bhagavad-gita, ...
They are semantically correct because the parent name is also at the right side.

@gerardnico
Copy link
Member

There are too many textual fields for sure.

Normally, you need only:

  • a very short text: the name (used for navigation)
  • a one-line text: the title
  • a multi-line text: the description

Historically, there are more but practically they are not needed.

@gerardnico
Copy link
Member

Chapter 1, Chapter 2, Chapter 3, Text 1, Text 2, Text 3 looks like styling. If you need chapter before a heading, it's more of a styling problem.

If you use the title (label) as name, you got quickly in a styling problem with overflow.

@gerardnico
Copy link
Member

In other words, the H1 and label should not exist.

@gerardnico
Copy link
Member

I could delete them and use them as default for a title but not for a name.

@vaniwiki
Copy link
Author

What do you mean with to change that somehow ? Can you give an example of a deep hierarchy where the name is a problem?

Here is an example of my meta tags:

    "name":"SB 1.1.1",
    "label":"Text 1",
    "h1":"SB 1.1.1",
    "title":"Śrīmad Bhāgavatam 1.1.1",

For me it makes sense to keep name as a unique identifier. I figured that I could use "label" for sidebar navigation.

Here is how breadcrumbs look with these sources:
"name": Home > Books > Srimad-Bhagavatam > SB Canto 1 > SB 1.1: Questions by The Sages > SB 1.1.1
"label": Home > Books > Srimad-Bhagavatam > Canto 1 > Chapter 1 > Text 1

And if possible to force it back to "path": Home > Books > SB > 1 > 1 This is especially nice for mobile view.

The "name" tag makes the breadcrumbs repeat the same information (book name) four times, whereas "label" is custom navigation to address this issue. I would like to keep things as logical and semantically correct as possible. Let me know if there is a better way to do this!

@gerardnico
Copy link
Member

Or may be not. I can delete the label and make it the default for name :)
The description is pretty the same as a name.
https://combostrap.com/page/the-label-fzgbczwi

@vaniwiki
Copy link
Author

You cannot just add a "crumb" meta tag? Or make it so we can set the breadcrumb meta source?

@vaniwiki
Copy link
Author

vaniwiki commented May 21, 2024

If the <breadcrumb /> tag gets an option to set its output, like page-explorer, one can potentially do things like:

<box class="d-none d-md-block> <breadcrumb output="h1" /> </box>
<box class="d-block d-md-none> <breadcrumb output="path" /> </box>

To get "shorthand" breadcrumbs on mobile device, while retaining full length breadcrumbs on device sizes above.

@vaniwiki
Copy link
Author

Not only that, but one would be able to set different type breadcrumbs per section. I have nested namespaces where I want short breadcrumbs, and then I have some shallow 1-level namespaces where I want to keep them longer. ☺️🙏🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants