API reference

wodoc is both a command-line tool and an OCaml library. The library exposes one module per pass of the pipeline; the wodoc command-line subcommands (Commands) are thin wrappers over them.

Modules

  • Wodoc.Preprocess Pre-processing of odoc source files.
  • Wodoc.Render wodoc rendering pass over odoc's HTML output.
  • Wodoc.Assemble Assembly layer: wrap odoc's rendered HTML in a project-provided site template.
  • Wodoc.Nav Build a project's API module navigation from a curated odoc index.
  • Wodoc.Resolve Link cross-package "sibling" references odoc left unresolved.
  • Wodoc.Convert Best-effort converter from extended wikicréole to odoc .mld with wodoc markers.
  • Wodoc.Config
  • Wodoc.Build
  • Wodoc.Blog
  • Wodoc.Llms Generate the LLM-friendly index files for a built project doc, from the Markdown twin tree that Wodoc.Build produces in the output directory.
  • Wodoc.Theme Built-in default assets shipped by wodoc build, so it produces a styled, self-contained site with no theme setup. Each is overridable: the stylesheet via the (css …) config stanza, the top menu via --menu.

Where to start

  • Wodoc.Preprocess: rewrite {%wodoc:…%} markers to HTML-comment sentinels before odoc runs.
  • Wodoc.Render: turn those sentinels in odoc's HTML into real nested HTML.
  • Wodoc.Assemble: wrap the rendered HTML in a project's site template.
  • Wodoc.Nav: render a client/server project's API module list from a curated odoc index (the manual's own navigation is declared in the doc/wodoc config, not here).
  • Wodoc.Resolve: link cross-package "sibling" references odoc left dead.
  • Wodoc.Convert: the wikicréole → .mld migration aid.
  • Wodoc.Config: parse the declarative doc/wodoc file.
  • Wodoc.Build: the turn-key wodoc build: assemble a whole site from it.
  • Wodoc.Blog: the ultra-simple blog: dated .mld posts, a generated nav section and a "latest posts" landing fragment.
  • Wodoc.Llms: generate the llms.txt / llms-full.txt index from the Markdown twin tree (the LLM-friendly view of a built site).
  • Wodoc.Theme: the built-in default assets (theme stylesheet, top bar) shipped when a project configures none.