ocaml/odoc

Name: odoc

Owner: OCaml

Description: OCaml documentation generator

Created: 2016-06-15 14:10:32.0

Updated: 2018-05-09 21:02:40.0

Pushed: 2018-05-21 14:28:17.0

Homepage:

Size: 1621

Language: OCaml

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

odoc

odoc is a documentation generator for OCaml. It reads doc comments, delimited with (** ... *), and outputs HTML. See example output at docs.mirage.io.

Text inside doc comments is marked up in ocamldoc syntax:

compare : string -> string -> int
[compare s1 s2] compares [s1] and [s2] in {e lexicographic} order. The
result is negative if [s1] precedes [s2], positive if [s1] follows [s2],
and zero if [s1] and [s2] are equal. *)

The syntax reference is here. There is also an explanation of how to attach comments to specific types, values, and other elements in your program.


odoc's main advantage over ocamldoc is an accurate cross-referencer, which handles the complexity of the OCaml module system. odoc also offers a good opportunity to improve HTML output compared to ocamldoc, but this is very much a work in progress :)


Installing and usage
 install odoc

The easiest way to use odoc right now is by having Dune (Jbuilder) drive it. This command should work in most Jbuilder projects out of the box:

lder build @doc

The generated docs can then be found locally at ./_build/default/_doc/_html/index.html.


Contact

odoc is most discussed on discuss.ocaml.org's Ecosystem category with the odoc tag. Please also don't hesitate to open an issue.


Contributing

Any question asked, issue opened, feedback offered, is a contribution to odoc, and the project and all its users are thankful :) If you'd like to contribute code specifically, you may find the guide in CONTRIBUTING.md helpful. If anything is missing from it, please don't hesitate to reach out for help.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.