vite icon indicating copy to clipboard operation
vite copied to clipboard

fix: broken links in docs/guide/why.md

Open akshays-repo opened this issue 1 year ago • 3 comments

Description

This pull request addresses the issue of broken links in the docs/guide/why.md file that were resulting in "file not found" errors when we try to click from the github.

image

akshays-repo avatar Jul 31 '24 14:07 akshays-repo

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

These links are not meant to be followed in GitHub. They work fine in the deployed docs https://vitejs.dev/guide/why.html

But I think we could change this. I'll ask to others to see what they think. Maybe we could move all internal links to use .md if there is consensus. Right now it is a mixed bag.

patak-dev avatar Jul 31 '24 15:07 patak-dev

Yeah I think it makes sense to enforce .md, but it won't resolve every links. Some links we're using root paths too, like [why](/guide/why), and that won't work when editing on github, e.g. https://github.com/vitejs/vite/blob/1025bb6d8f21c0cb9fe72405d42e0f91bb3f1d8e/docs/blog/announcing-vite5-1.md#L42

So if we want to really support this, we need every links to be relative and with .md. I'm not sure how feasible is that 🤔 I don't mind making everything relative though, but I'd prefer if there's a script or lint rule that can auto-fix them now and for the future.

bluwy avatar Aug 01 '24 08:08 bluwy