vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
11.33k stars 1.83k forks source link

dead link errors should show transformed URL #3774

Open vincesp opened 2 weeks ago

vincesp commented 2 weeks ago

Describe the bug

This bug was not present in v1.0.0-rc.24 but is now present in v1.1.0.

Current behavior:

Reproduction

https://stackblitz.com/edit/vite-ezwnqb?file=docs%2Fexample.md

Expected behavior

Behavior like in v1.0.0-rc.24:

https://stackblitz.com/edit/vite-5ovzcs?file=package.json

System Info

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: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.3 - /usr/local/bin/pnpm
  npmPackages:
    vitepress: latest => 1.1.0

Additional context

No response

Validations

brc-dd commented 2 weeks ago

add this to top of your config:

process.env.VITE_EXTRA_EXTENSIONS = 'crt'  // comma separated list: 'foo,bar,baz'

regarding error message it probably can be improved 👀

vincesp commented 2 weeks ago

While downgrading my project to a working version of vitepress, I found out that v1.0.0-rc.39 is the last working version. This bug behavior apparently introduced with 1.0.0-rc.40.

vincesp commented 2 weeks ago

Sorry for the "racing condition." I did not mean to re-open the task, just wanted to document the exact version when the behavior changed.

brc-dd commented 2 weeks ago

Ah, no. You didn't. I reopened it because of slightly misleading error message, and missing docs.