Skip to content

Conversation

its-miroma
Copy link
Contributor

@its-miroma its-miroma commented Sep 26, 2025

Description

Similar to editLink, this PR allows links of Nav Bar items to be defined as functions that take in PageData.

For example, this allows a nav bar item to show an older version of the currently open page:

nav: [{
  text: "Show Page in V1",
  link: ({ relativePath }) => relativePath.replace(/^[/]/, "/v1/"),
}]

Linked Issues

none

Additional Context

  • The translations under docs are generated by AI. I unfortunately do not speak any of those languages.

Tip

The author of this PR can publish a preview release by commenting /publish below.

@its-miroma its-miroma force-pushed the feat/nav-link-function branch from ea44a78 to dc791a4 Compare September 26, 2025 21:28
Copy link
Member

@brc-dd brc-dd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM.

The translations under docs are generated by AI. I unfortunately do not speak any of those languages.

Yeah that's fine. You didn't need to write those too, someone from the community would've picked up.

@its-miroma
Copy link
Contributor Author

Should I drop them?

@brc-dd
Copy link
Member

brc-dd commented Sep 27, 2025

Nah, those seem to be fine. I'll merge.

@brc-dd brc-dd merged commit 34cfa91 into vuejs:main Sep 27, 2025
9 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants