You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This bug was not present in v1.0.0-rc.24 but is now present in v1.1.0.
Create a file with the file extension .crt in the public folder
Link to that file from a Markdown file
Current behavior:
During page generation, the file extension .html is added after the file extension .crt
This results in a dead link
Fortunately, the dead link checker picks up the dead link and reports it, which results in a failed build. Unfortunately, the error message is misleading. It prints the original file name "/some-root-ca.crt" which would not be a dead link instead of the corrupted file name "/some-root-ca.crt.html" which is the actual dead link.
The link to the crt file is corrupted, points to /some-root-ca.crt.html instead of /some-root-ca.crt
Run npm run docs:build
The following error will be displayed:
(!) Found dead link /some-root-ca.crt in file example.md
If this is expected, you can disable this check via config. Refer: https://vitepress.dev/reference/site-config#ignoredeadlinks
x Build failed in 1.81s
✖ building client + server bundles...
build error:
Error: [vitepress] 1 dead link(s) found.
at Object.renderStart (/home/projects/vite-ezwnqb/node_modules/vitepress/dist/node/serve-Csn-CKFx.js:42382:15)
at eval (/home/projects/vite-ezwnqb/node_modules/rollup/dist/es/shared/node-entry.js:19622:40)
at async PluginDriver.hookParallel (/home/projects/vite-ezwnqb/node_modules/rollup/dist/es/shared/node-entry.js:19550:9)
at async Bundle.generate (/home/projects/vite-ezwnqb/node_modules/rollup/dist/es/shared/node-entry.js:17980:13)
at async eval (/home/projects/vite-ezwnqb/node_modules/rollup/dist/es/shared/node-entry.js:20539:27)
at async catchUnfinishedHookActions (/home/projects/vite-ezwnqb/node_modules/rollup/dist/es/shared/node-entry.js:19967:16)
Note that the link displayed is not a dead link. The error message does not tell that it in fact tries to link to /some-root-ca.crt.html which does not exist.
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.
brc-dd
changed the title
Build adds file extension .html to .crt files, resulting in dead links
dead link errors should show transformed URL
Apr 10, 2024
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
npm run docs:dev
npm run docs:build
Expected behavior
Behavior like in v1.0.0-rc.24:
https://stackblitz.com/edit/vite-5ovzcs?file=package.json
System Info
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: