vuejs / router

🚦 The official router for Vue.js
https://router.vuejs.org/
MIT License
3.74k stars 1.15k forks source link

Docs miss RouteLocation + further interfaces #2284

Open manniL opened 1 week ago

manniL commented 1 week ago

Reproduction

https://router.vuejs.org/api/interfaces/routelocationnormalized.html#Interface-RouteLocationNormalized

Steps to reproduce the bug

  1. Open the previously working website

Expected behavior

It shows the type

Actual behavior

It does not show the type

Additional information

I know there was a type restructuring, nevertheless a 301 or at least an explanation + link to older docs would be helpful for people linking to the vue router docs and search engines ☺️

posva commented 1 week ago

It would be indeed great as long as it’s automatically generated. Otherwise it’s way too much work. The typedoc maybe have an option to add this but not that I know of so I don’t think this is really actionable unfortunately

manniL commented 1 week ago

could we at least 301 them to the "follow-up" types? Should be only a hand full of them

posva commented 1 week ago

Doing it partially (as in by fixing the ones you find) would be inefficient and waste time. It's either complete (probably more than 25 links) or nothing. And nothing ensures these (automatically generated) links could change in the future, so it might require more entries into a _redirect file that keeps growing over time. All these entries must be tested, too, to ensure they do not break any existing pages or create loops (although maybe Netlify handles that). Overall, manually handling the situation is highly time-consuming and error-prone.

I would like to see a plugin or feature in type doc to generate a table of stable links that would allow generating a redirects file so that types keep working no matter if they change from being an interface to being a type.

It does bother me thought for SEO... If you manage to build the list of redirects and it's less than 15, put it in a _redirects and send a PR, it should be good enough.