question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Morrizcommented, Nov 3, 2020

Nevermind. Search worked. I expected it to be in one of the sidebar item types

1reaction
slorbercommented, Nov 3, 2020

@Morriz yes it is, using sidebar_label frontmatter.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found