art-w / sherlodoc

Fuzzy type search for OCaml documentation
MIT License
70 stars 6 forks source link

Internal documentation links are missing a base url #13

Open art-w opened 7 months ago

art-w commented 7 months ago

Links in documentation comments works correctly in the odoc static html results. On the opam-wide website however, they don't point to a valid url as the links are relative (and so don't point to ocaml.org).

For example Stdlib.List.flatten has the description Same as {!concat} but the link to concat is broken (... the links are rendered in black with css to avoid the user clicking them!). We would probably need some support from odoc html rendering to specify a base url... or we could hack the odoc generated html to fix the links.

EmileTrotignon commented 7 months ago

I have tried to add a test for this : https://github.com/art-w/sherlodoc/pull/22 However the links are not include in the docstring when it is rendered by odoc for the search. How do you get them on www sherlodoc ?

art-w commented 7 months ago

Thanks for the test! Indeed hm, perhaps the links on doc.sherlocode.com are coming from my dirty rebase of odoc.search for odoc 2.2.0 to run on the voodoo generated files... I'll try again without my hacks once https://github.com/ocaml-doc/voodoo/pull/128 is live and close this issue :)