dimforge / rapier.rs

Official website for the Rapier physics engine.
https://rapier.rs
17 stars 48 forks source link

Broken links #41

Open martin-t opened 1 year ago

martin-t commented 1 year ago

The docs contain broken links - examples:

Note these are just 2 examples i ran into, there's probably more (especially since both seem to have the same cause - the relative links should go up first).

Both return 404 so it should be possible to write a periodic CI action to check all links on the website and detect this automatically.

regzon commented 1 year ago

I've found out that the problem is related to the way links are generated.

When you open a documentation page, it adds a trailing slash to the URL. This trailing slash makes relative links broken.

But when you navigate through the documentation via the left panel, it doesn't add trailing slashes, and relative links work fine.

filtoid commented 1 year ago

I have found one on this page: https://rapier.rs/docs/user_guides/bevy_plugin/advanced_collision_detection/#collision-and-contact-force-events

When linking out to advanced_collision_detection#collision-and-contact-force-events it adds an extra folder and becomes this: https://rapier.rs/docs/user_guides/bevy_plugin/colliders/advanced_collision_detection#collision-and-contact-force-events

When it should be this: https://rapier.rs/docs/user_guides/bevy_plugin/advanced_collision_detection/#collision-and-contact-force-events

I was going to submit a PR to add the leading slash but actually I think that would simply make the link relative to the root domain, which would also be wrong - not sure if there is a syntax to make it go up one dir first.

Vrixyz commented 1 month ago

some more:

gavinmorrow commented 1 week ago

It happens to all the links in the user guides as far as I can tell (not including the sidebar).

gavinmorrow commented 1 week ago

I think it could probably be fixed if all the links had ../ prepended to them. (So rigid_bodies#mass-properties../rigid_bodies#mass-properties).

I was going to try this and then make a pull request but I can't even get the site to build on my computer.