nicholas-maltbie / OpenKCC

Open Source Kinematic Character Controller for Unity
http://nickmaltbie.com/OpenKCC/
MIT License
642 stars 60 forks source link

Documentation Version Swapping Doesn't work with Chapter Links #161

Open nicholas-maltbie opened 1 year ago

nicholas-maltbie commented 1 year ago

Swapping version with a chapter selected doesn't load the new URL page properly.

Need to patch this behaviour in the main.js script.

Changing version on a page with a chapter selected should result like this:

https://nickmaltbie.com/OpenKCC/docs/manual/introduction.html#why-kinematic

to

https://nickmaltbie.com/OpenKCC/docs/v1.3.0/manual/introduction.html#why-kinematic

but instead results like this

https://nickmaltbie.com/OpenKCC/docs/manual/introduction.html#why-kinematic/../../v1.2.3/

Need to fix it to ignore the chapter tag when computing the new web link in the selectVersion function.

https://github.com/nicholas-maltbie/OpenKCC/blob/633a60ac749a7bb35fcd916f0a16520883bbff7c/Documentation/templates/custom/styles/main.js#L12-L22