melonJS icon indicating copy to clipboard operation
melonJS copied to clipboard

Hyperlinks to source code within documentation contain absolute path on obiot's PC

Open Waltibaba opened this issue 1 year ago • 3 comments

Describe the bug Hyperlinks to source code lines on github within the Documentation on https://melonjs.github.io/melonJS/docs/index.html , are broken. They include @obiot 's absolute path to his source workspace, rather than relative path.

To Reproduce

  1. Go to collision overview documentation
  2. Click on maxChildren source link collision.js:11
  3. See error --> 404: 'The master branch of melonJS does not contain the path Users/obiot/Documents/GitHub/melonJS/src/physics/collision.js.'

Expected behavior link to https://github.com/melonjs/melonJS/blob/master/src/physics/collision.js#L11 instead

Device (please complete the following information):

  • Browser: Firefox 122.0 (but it shouldn't matter, the hyperlinks are broken)
  • melonJS Version: latest (documentation site)

Waltibaba avatar Feb 07 '24 08:02 Waltibaba

Good catch ! unfortunately this seems to be a problem with webdoc that we use to generate our documentation, and webdoc is not maintained anymore. So while it looks like an easy fix, Im afraid the only way is to move to something else for doc generation

obiot avatar Feb 07 '24 11:02 obiot

Would you like a workaround? I've built a quick and dirty Dockerfile that just clones this repo into "/", does npm install; npm run doc-prod. That generates this: <a href=https://github.com/melonjs/melonJS/blob/master//src/physics/collision.js#L33>collision.js:33</a> collision.js:33

Waltibaba avatar Feb 08 '24 07:02 Waltibaba

Sent you a PR #1217 Thanks for all of your hard work! Enjoying using the engine and the docs are great too!

Waltibaba avatar Feb 08 '24 08:02 Waltibaba

closing as this was solved with the corresponding Pull Request. thanks again for this !

obiot avatar Feb 23 '24 06:02 obiot