-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Generated Sidebar Pagination will not use doc Label but the File Name #9781
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
difficulty: starter
Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.
domain: content plugin
Related to content plugin emitting metadata for theme consumption
Comments
LeonnardoVerol
added
bug
An error in the Docusaurus core causing instability or issues with its execution
status: needs triage
This issue has not been triaged by maintainers
labels
Jan 23, 2024
Yes, something is wrong here. docusaurus/packages/docusaurus-plugin-content-docs/src/sidebars/utils.ts Lines 481 to 491 in cd0e608
Our doc navlink transform logic only takes into account the explicit sidebar_label front matter, but not the sidebar label acquired from the explicit sidebar label config. We need to fetch it from the SidebarNavigationItem we already calculated beforehand.
|
Josh-Cena
added
difficulty: starter
Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.
domain: content plugin
Related to content plugin emitting metadata for theme consumption
and removed
status: needs triage
This issue has not been triaged by maintainers
labels
Mar 3, 2024
7 tasks
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This should be the order of precedence, correct? Explicitly declared label should have higher priority over front matter. title: paginationLabel ?? sidebarConfigLabel ?? sidebarLabel ?? title |
side bar label in front matter takes precedence. |
Abdullah-03
added a commit
to Abdullah-03/docusaurus
that referenced
this issue
Apr 5, 2024
…file name as pagination label rather than the sidebar 'label' defined through item definition Fixes facebook#9781
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
An error in the Docusaurus core causing instability or issues with its execution
difficulty: starter
Issues that are starter difficulty level, e.g. minimal tweaking with a clear test plan.
domain: content plugin
Related to content plugin emitting metadata for theme consumption
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When generating pagination from the sidebar, the "Next" and "Previous" Cards will ignore the doc label and default to the file name. (when the doc has no H1 or Title property)
Reproducible demo
No response
Steps to reproduce
Expected behavior
The generated Pagination would use the label property from the sidebar and not the file name
Actual behavior
The generated Pagination ignores the label property from the sidebar and uses the file name
Your environment
Self-service
The text was updated successfully, but these errors were encountered: