[v2] Allow title and label for docs in sidebars.js
See original GitHub issue🚀 Feature
Currently, it only seems possible to specify sidebar_label in a page’s frontmatter. It would be useful to be able to specify a label for type: 'docs' in sidebars.js.
module.exports = {
docs: [
{
type: "category",
label: "Some Category",
items: [
{
type: "doc",
id: "doc1",
label: "First document" // <--- like this
}
]
}
]
}
My assumption would be that anything specified in sidebars.js would override the frontmatter.
Have you read the Contributing Guidelines on issues?
Yes
Motivation
I have a large set of markdown files that are imported on a regular basis from a separate code repo. It would be nice to avoid having to inject frontmatter into every one of those documents on import in order to get human readable labels on the sidebar.
Pitch
Allow a label attribute on type: 'doc', just like on type: 'category' and type: 'link'.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Sidebar - Docusaurus
By enabling the themeConfig.docs.sidebar.hideable option, you can make the entire sidebar hideable, allowing users to better focus on the ...
Read more >Is there a way to have two docs in Docusaurus 2?
First, create the other docs folder, like docs , docs-api , docs-system . (1) In your docusaurus.config.js file, configure your "default" docs:
Read more >Dialogs and Sidebars in Google Workspace Documents
It displays a message, a text-input field, and an "OK" button; a title and alternative buttons are optional. It is similar to calling...
Read more >Doc-only mode, versioning, sidebar, add new doc ... - YouTube
Introduction on how to edit the documentation section. Create a document, enable documentation -only mode, edit and modify the sidebar, ...
Read more >Control your sidebar navigation - Redocly
Labels let you create optional custom titles for pages in the sidebar. By default, if a page is linked without a label, the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Nevermind. Search worked. I expected it to be in one of the sidebar item types
@Morriz yes it is, using sidebar_label frontmatter.