Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External links cannot jump correctly when the base attribute is enabled #4365

Open
ajiho opened this issue Nov 19, 2024 · 0 comments
Open

External links cannot jump correctly when the base attribute is enabled #4365

ajiho opened this issue Nov 19, 2024 · 0 comments
Labels
bug: pending triage Maybe a bug, waiting for confirmation

Comments

@ajiho
Copy link

ajiho commented Nov 19, 2024

Describe the bug

This is the sidebar configuration

themeConfig: {
sidebar:{
  "/en/": {
    "base": "/en/",
    "items": [
      {
        "text": "introduce",
        "items": [
          {
            "text": "Release log",
            "link": "releases"
          },
          {
            "text": "Upgrade",
            "link": "upgrade"
          },
          {
            "text": "foo",
            "link": "https://foo.com/"
          }
        ]
      }
    ]
  }
}
}

image

When I make some changes, it returns to normal

themeConfig: {
sidebar:{
  "/en/": {
    "items": [
      {
        "text": "introduce",
        "items": [
          {
            "text": "Release log",
            "link": "/en/releases"
          },
          {
            "text": "Upgrade",
            "link": "/en/upgrade"
          },
          {
            "text": "foo",
            "link": "https://foo.com/"
          }
        ]
      }
    ]
  }
}
}

image

Reproduction

unnecessary

Expected behavior

When I enable the base attribute, it allows external links in the submenu to be accessed normally

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz
    Memory: 1.34 GB / 7.91 GB
  Binaries:
    Node: 22.11.0 - C:\Program Files\nodejs\node.EXE      
    npm: 10.9.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Internet Explorer: 11.0.19041.3636
  npmPackages:
    vitepress: ^1.5.0 => 1.5.0


### Additional context

_No response_

### Validations

- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).
- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)
- [X] Read the [docs](https://vitepress.dev).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@ajiho ajiho added the bug: pending triage Maybe a bug, waiting for confirmation label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: pending triage Maybe a bug, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

1 participant