Clone this repository
For self-hosted knots, clone URLs may differ based on your setup.
Download tar.gz
- Add managed widget protocol (display_managed, command, register_adapter)
for external widget adapters like Leaflet maps
- Extract Leaflet map adapter into separate js_top_worker-widget-leaflet
library, loadable via #require
- Add widget rendering to x-ocaml web component (widget_render.ml) so
widgets work in .mld documentation pages
- Wire widget callbacks through OCaml client (js_top_worker_client_msg.ml)
- Complete the preloaded list in findlibish.ml to match all transitive
worker dependencies, preventing "file already exists" errors when
#require loads packages already compiled into the worker
- Add demo_widgets.mld and demo_map.mld documentation pages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix sidebar kindBadge: map leaf-page→pg, module-type→MT, etc. (was
showing "L" for leaf-page entries)
- Stop escaping sidebar content HTML (entries contain <code> tags)
- Fix inline sidebar JSON: use Html.cdata_script instead of Html.txt
to prevent HTML-escaping inside <script> tags
- Add --xo-* CSS custom properties for x-ocaml cells in light/dark themes
- Fix support file registration: use 'opam var share' instead of
'opam var x-ocaml:share' (works without x-ocaml being an opam package)
- Suppress empty <li> from config-only extension tags (@x-ocaml.*)
- Add worker_url field to jtw opam findlib_index.json
- Refactor x-ocaml.js worker URL discovery to support both direct
worker_url and day10-style version/content_hash paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The inline script loader hardcoded ./_x-ocaml/x-ocaml.js relative to the
page, but support files live under odoc.support/ at the doc root. Switch
to Js_url which odoc resolves against support_uri (like odoc.css). The
backend config is now communicated via a <meta> tag instead of a script
attribute.
Also: add x-ocaml dependency on merlin-js, add odoc-interactive-extension
dependency on x-ocaml, and remove unused js_top_worker-rpc.message dep.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Install x_ocaml.bc.js into the opam share directory and register it as
an odoc support file so that `odoc support-files -o DIR` copies
_x-ocaml/x-ocaml.js automatically, removing the need for manual
deployment in deploy.sh.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>