You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Docusaurus uses the same object to have localized strings of both title and sidebar_label of a page, using id as key that maps to title of that page. This is fine in most cases, but if the id and sidebar_label of a page are the same then the keys conflict, causing both of them to mix up.
This leads to behavior like #324. This gets even weirder when the same values are used across different versions of the docs, where the sidebar_label of the versioned doc gets mixed up with the title of latest doc.
Have you read the Contributing Guidelines on issues?
Yes I did.
To Reproduce
Choose a value for id for a page
Use the same value of id for sidebar_label as well
Use a title that is not the same as id or sidebar_label
Expected behavior
The title of the page and label on the sidebar are expected to be different.
Actual Behavior
The title of the page is the value of sidebar label instead of its actual one.
Reproducible Demo
Sample repo that contains same values for id and sidebar_label, with a different title, and across different versions.
After building the docs and running docusaurus-start, navigate to /docs/en/feature-awesome. Here the sidebar label should be feature-awesome, instead it is feature/awesome which is the title of latest doc with the same.
Proposed solution
Use different keys for titles, sidebar_labels, across different versions of the same page.
🐛 Bug Report
Docusaurus uses the same object to have localized strings of both
title
andsidebar_label
of a page, usingid
as key that maps totitle
of that page. This is fine in most cases, but if theid
andsidebar_label
of a page are the same then the keys conflict, causing both of them to mix up.This leads to behavior like #324. This gets even weirder when the same values are used across different versions of the docs, where the
sidebar_label
of the versioned doc gets mixed up with thetitle
of latest doc.Have you read the Contributing Guidelines on issues?
Yes I did.
To Reproduce
id
for a pageid
forsidebar_label
as welltitle
that is not the same asid
orsidebar_label
Expected behavior
The title of the page and label on the sidebar are expected to be different.
Actual Behavior
The title of the page is the value of sidebar label instead of its actual one.
Reproducible Demo
Sample repo that contains same values for
id
andsidebar_label
, with a differenttitle
, and across different versions.After building the docs and running
docusaurus-start
, navigate to/docs/en/feature-awesome
. Here the sidebar label should befeature-awesome
, instead it isfeature/awesome
which is the title of latest doc with the same.Proposed solution
Use different keys for
title
s,sidebar_label
s, across different versions of the same page.The text was updated successfully, but these errors were encountered: