[OCaml] Mobile-friendly clone of cgit.
docs generate browsable odoc HTML with dune build @doc
dune build @doc produced an empty package index: odoc skips private libraries, and the ogit library had no public_name. Make it public, which matches the executables that were already public and leaves ogit.opam unchanged. Add doc/index.mld as the package landing page, ordering the modules by the request flow rather than alphabetically, and doc/conventions.mld recording where documentation is expected to live. scripts/docs.sh builds and opens the result, since the entry point is buried in _build. Fill in the module-level documentation that was missing: Config, Diff, Handlers, Main, Routes, Static_handler, both bin executables, and nine test modules. Where behaviour is usable but undescribed, or a rough edge is worth recording, the comment carries a TODO — the hard-coded static cache lifetime, Diff's large-input fallback threshold, and ogit-write-config clobbering its target without warning. Also disambiguate five odoc references in ui.mli that collided with same-named sections or types, so the doc build is warning-free. Verified: dune clean followed by fmt, build, 62 tests and @doc all pass with no warnings; 34 HTML pages generated; every module page except the crunch-generated Static_assets carries a description; all 17 module links on the landing page resolve; server smoke test returns 200 for a page and a static asset.
Changed files
- README.org
- bin/config_writer.ml
- bin/main.ml
- doc/conventions.mld
- doc/dune
- doc/index.mld
- lib/config.ml
- lib/diff.ml
- lib/dune
- lib/handlers.ml
- lib/main.ml
- lib/routes.ml
- lib/static_handler.ml
- lib/views/ui.mli
- scripts/docs.sh
- test/test_config.ml
- test/test_discovery.ml
- test/test_dispatch.ml
- test/test_list_ext.ml
- test/test_ogit.ml
- test/test_router.ml
- test/test_tree_paths.ml
- test/test_validation.ml
- test/test_views.ml