Skip to content

Clicking internal links without .html pointing a directory now triggers non-SPA navigation #3225

@sapphi-red

Description

@sapphi-red

Describe the bug

- [/example/](/example/) ❌
- [./example/](./example/) ❌
- [/example/index.md](/example/index.md) ❌
- [./example/index.md](./example/index.md) ❌
- the Left top "Vitepress" ❌
- Sidebar "example" ❌
- Navbar "example" ❌

Clicking these internal links now triggers non-SPA navigation.

related: https://vitepress.dev/guide/markdown#internal-links

Reproduction

https://stackblitz.com/edit/vite-tyiztl?file=docs%2Findex.md,docs%2F.vitepress%2Fconfig.ts

Expected behavior

SPA navigation happens like it does with 1.0.0-rc.27.

System Info

Stackblitz

  System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.18.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 9.4.2 - /usr/local/bin/npm
    pnpm: 8.10.0 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: 1.0.0-rc.28 => 1.0.0-rc.28

Additional context

This bug seems to be caused by #3218

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions