Skip to content

Configurable navbar #777

@LuHugo

Description

@LuHugo

What version of starlight are you using?

0.10.2

What is your idea?

As the title says, we need a configurable navigation bar menu.
The navbar option can be added to the starlight configuration item. navbar contains the data needed to generate the menu。
For example:

export default defineConfig({
  integrations: [starlight({
       ...
	navbar: {
                showSearch: false,
                showLocale: false,
		items: [
			{
				label: "Home",
				to: "/",
				position: "left",
				activeBaseRegex: '/',
				type: "link",
			},
			{
				label: "Reference",
				to: "/reference",
				position: "left",
				activeBaseRegex: '/reference',
				type: "dropdown",
				items: [MenuItem]
			}
		]
	}
  })]
});

Why is this feature necessary?

Can organize website navigation more freely

Do you have examples of this feature in other projects?

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions