Skip to content

Confusing interaction between sidebar_label and title #324

@steveklabnik

Description

@steveklabnik

As https://docusaurus.io/docs/en/doc-markdown.html says:

title: The title of your document. If this field is not present, the document's title will default to it's id.

sidebar_label: The text shown in the document sidebar for this document. If this field is not present, the document's sidebar_label will default to it's title.

I'm trying to use these two together. Here's a concrete example:

I have foo.md. It has this as its header:

---
title: A Foo
---

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:

---
title: A Foo
siebar_label: Foo
---

And now, my page title is back to Foo, rather than A Foo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions