DIY: build your own documentation.

Requirements

Price: 0€

Paf Patience_dif Brr

👷 Step 1: Open your project ☆☆☆☆☆

Open a terminal, and create a new undocumented project

$ git clone https://github.com/panglesd/undocumented_project.git

🚧 Step 2: Build you documentation ★☆☆☆☆

$ dune build @doc

Modules are expanded, as in

include Comparable.S with type t := t

🖊️ Step 3: Add documentation comment to signature items ★★★☆☆

(** {1 Part about what follows} *)

(** Refer to {!x} for an example of a value of type [t]. *)
type t

(** Refer to {!t} to understand what [x] can possibly be. *)
val x : t

Odoc's cheatsheet can be handy!

📜 Step 4: Add index and standalone pages ★★★★★

doc/index.mld ---> index page
doc/tutorial.mld ---> another page
doc/dune:
   (documentation)  ; documentation stanza

✅ Step 5: Profit

  • Local doc browsing using odig

  • Automatic publication of docs on ocaml.org

Teaser: odoc 3.0 is coming!

🔍 Support for search using sherlodoc (type-directed search)

#️⃣ Rendered source code

🎬 Support for assets and medias

🪜 Support for hierarchical documentation

🌍️ Global sidebar

🔀 Cross-package references

🚀 More efficient incremental compilation

and much more!

🫶 Thanks for your attention! 🫶