-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Confusing interaction between sidebar_label and title #324
Comments
@steveklabnik Hi! Interesting. Let me make sure we are on the same page here. The example documentation that comes with
When I run the site, I get: Title is "Latinish" in both the Chrome tab and the page. |
Hm, okay. So I have, in ---
title: the future
sidebar_label: future
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan lectus ac ornare consectetur. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer ac sem malesuada, pretium dui sed, dignissim massa. Nulla facilisi. In mattis neque nec sem interdum pretium. Quisque gravida neque ac libero auctor cursus. Etiam tempor laoreet libero, quis hendrerit libero gravida ac. Sed enim elit, tincidunt a elit vel, commodo sagittis ex. Quisque nec erat lobortis, vehicula libero ac, rutrum libero. Aliquam rhoncus sit amet odio nec posuere.
I get this: If I remove the sidebar label ---
title: the future
---
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed accumsan lectus ac ornare consectetur. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Integer ac sem malesuada, pretium dui sed, dignissim massa. Nulla facilisi. In mattis neque nec sem interdum pretium. Quisque gravida neque ac libero auctor cursus. Etiam tempor laoreet libero, quis hendrerit libero gravida ac. Sed enim elit, tincidunt a elit vel, commodo sagittis ex. Quisque nec erat lobortis, vehicula libero ac, rutrum libero. Aliquam rhoncus sit amet odio nec posuere.
I get this: This is true if I set I was mulling over what's different between your example and mine, and it hit me: my Tricky! This still sounds like a bug, I guess, but I have no idea how that might happen. |
@steveklabnik Good reproduction. Thanks! I will look into this. |
@steveklabnik I think that the problem is in write-translation.js file
If localized_id=id is the same as sidebar_label inside the if sidebar_label value replaces the localized_id one Maybe a possibile solution can be moving sidebar and id translations under different keys inside 'localized-strings'. What do you think @JoelMarcey ? |
As https://docusaurus.io/docs/en/doc-markdown.html says:
I'm trying to use these two together. Here's a concrete example:
I have
foo.md
. It has this as its header:This works great. But, this means I have "A Foo" in the sidebar, and I'd like it to be Foo. So I set the sidebar_label:
And now, my page title is back to
Foo
, rather thanA Foo
.The text was updated successfully, but these errors were encountered: