Skip to content
Unofficial OCaml Standard Library Docs - Modern Theme
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is an unofficial version of the OCaml Standard Library docs but with a modernized theme. Click here for where the guide is hosted.

It parses the official html docs, converts it into json to store it. Then it decodes the json and builds a modern site around it using better structure with a sidebar to quickly move between modules and functions.

It uses the following libraries:

From the OCaml opam libraries:

  • lambdasoup
  • atdgen

From the Bucklescript npm libraries:

  • bucklescript-tea
  • bs-json


  1. Clone the repo:
git clone
  1. Download a copy of the official docs from: and store it in ocaml-modern-docs/parser directory.

So it should look like this:

  • ocaml-modern-docs/parser/htmlman/...
  • ocaml-modern-docs/parser/htmlman/libref/...
  1. Build the parser (make sure to have dune installed already)
cd parser
dune build parser.exe
dune exec ./parser.exe

This will output a modules.json file in the parser directory.

  1. Decode the json and build the site
cd ..  -- Back into the ocaml-modern-docs directory
npm install
npm run build
  1. Launch - If you have parcel and npm-run-all installed
npm run start


  • It's still a work in progress, but should be useful (It's just documentation)

  • The code needs some refactoring, especially the parser, so bear that in mind.

  • There was some hacks to get the decoding working because I couldn't figure out how to easily modify to the output for variants in atdgen and bs-json doesn't have a more flexible way to parse the json for variants not in the preferred format.

  • It was inspired by Elixir docs.

  • Not going to be actively maintained.



You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.