Proposition for modernizing the OCaml API from the official manual
Try it out here for the standard lib, or there for the compiler lib.
The documentation shown on the web page that is linked above is copyright Institut National de Recherche en Informatique et en Automatique (INRIA). A complete version can be obtained from this page.
- Install lambdasoup
opam install lambdasoup
-
Download or clone the repository
-
make
In the ocaml-api
directory, run make
. This will run the
process.ml
script, which downloads the manuals, populates the docs
directory, and copy the css, js and svg files.
- Browse!
firefox docs/index.html
Cleaning the docs
directory:
make clean
The src/*libref/index-??.js
files can be re-created from scratch:
make index
The behaviour of the script can be controlled by a few keywords:
makeindex
, overwrite
, silent
, and html
. (html
is true by
default unless makeindex
is present.)
dune exec src/process.exe # only process html files
dune exec src/process.exe makeindex # only create the index file
dune exec src/process.exe overwrite # force overwriting existing html files
dune exec src/process.exe makeindex html # create index and process html files
dune exec src/process.exe [...] silent # suppress console output
etc... (all keywords can be combined)