The odoc web page has some pretty neat features:
- An informative welcome page “The odoc suite” for five constituent packages.
- The links in the welcome page source (doc/main_index.mld) use the syntax
{{!/doc/page-index}odoc}. - There are both “local” and “global” indexes in the left-side margin.
Are these currently added by manual tweaking or can they be accessed using dune/opam/odoc?
I tried to reproduce the original site as follows:
git clone git@github.com:ocaml/odoc.git
cd odoc
opam switch create . 5.1.0
dune build @doc
But the result is not the same: the file at _build/default/_doc/_html/index.html is just the default “multi-package” index, and there is just a single “contents” side menu.
Similarly, when I try to use these features for a much simpler project: ocaml-ortools (branch: odoc-mainpage), my inter-package links are not understood:
File "../../../../doc/main_index.mld", line 4, characters 2-49:
Warning: Failed to resolve reference /ortools_solvers/index Path '/ortools_solvers/index' not found
File "../../../../doc/main_index.mld", line 3, characters 2-33:
Warning: Failed to resolve reference /ortools/index Path '/ortools/index' not found
Am I doing anything wrong?