Wodoc
wodoc (web + odoc) is an odoc driver that builds complete, styled websites from .mld and .mli sources — not just API documentation.
It extends odoc with backward-compatible presentational markers for arbitrary CSS classes, containers and layout, and adds a templating layer to assemble a full site (header, menus, version selector). Any OCaml project can use it — this very website is built by wodoc from its own sources.
Because wodoc's markers use a custom raw-markup target that stock odoc ignores, the same sources render as plain semantic documentation with a stock odoc (for example on ocaml.org) and as the full themed website when built with wodoc. There is no fork of odoc and no separate dialect to learn.
It can even host an ultra-simple blog on your site — dated .mld posts, auto-listed in the navigation, with a "latest posts" widget and an Atom feed for syndication. See Adding a blog.
Manual
- How it works — the pipeline and the one-source/two-outputs trick
- Building a complete site — home page, pages, navigation, theme, multiple projects, deployment
- Directives — the
{%wodoc:…%}reference (classes, containers, tables) - Authoring — what survives on ocaml.org, what is wodoc-only
- Configuration — the
doc/wodocfile: navigation, layout, versions.json - Commands —
build(turn-key), pluspreprocess,render,assemble,nav,resolve-refs,convert - Adding a blog — dated
.mldposts, the navigation list, the feed
API reference
wodoc is also an OCaml library: the same passes the wodoc command-line tool chains are exposed as modules. See the API overview, or jump to Wodoc.Preprocess, Wodoc.Render, Wodoc.Assemble, Wodoc.Nav, Wodoc.Resolve and Wodoc.Convert.
About
wodoc is developed in the ocsigen/wodoc repository and distributed under the MIT license.