odoc icon indicating copy to clipboard operation
odoc copied to clipboard

Cross package odoc page links

Open dbuenzli opened this issue 6 years ago • 4 comments

Unless I'm missing something it's not possible to make cross-package odoc pages links. I tried with something like:

{{!Odig.page-manual.odoc_themes}odig's odoc theme}

to link from a package to odig's manual here but got the error:

Expected 'module-', 'module-type-', 'type-', 'class-', 'class-type-', or an unqualified reference.

It would be nice to abe able to.

dbuenzli avatar Jun 26 '19 20:06 dbuenzli

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

github-actions[bot] avatar May 01 '20 15:05 github-actions[bot]

Is it possible to have cross-package module links? I'm guessing they aren't possible neither.

lukstafi avatar Mar 05 '23 14:03 lukstafi

You can make links on the compilation units of other libraries and doc systems like odig or ocaml.org will resolve the links correctly.

dbuenzli avatar Mar 05 '23 17:03 dbuenzli

The reference Odig.page-manual.odoc_themes means there's a page manual inside a module Odig. This is not possible.

The driver will probably create a page named odig (not capitalized) as the parent of the other pages and modules inside the package. Unfortunately it is not possible to write page-odig.page-manual as Odoc doesn't support references to children pages (page manual is a children of page odig).

Implementing this might imply prefixing page names (like Dune does to modules) or creating a new scheme for looking up pages (the search path passed through -I is not enough to disambiguate pages). Embedding the content of children pages into the parent page is not possible without rewriting the way page are compiled/linked.

Julow avatar Mar 30 '23 14:03 Julow