commits
- docsite shell: dispatch odoc-spa-loaded after SPA script loading,
matching the jon-shell implementation
- scrollycode: listen for odoc-spa-loaded to reinit after SPA nav
Plugins checked:
- mermaid: uses odoc-spa-loaded ✓
- dot: uses odoc-spa-loaded ✓
- msc: uses odoc-spa-loaded ✓
- scrollycode: uses odoc-spa-loaded ✓ (updated)
- admonition: CSS only, no JS needed ✓
- rfc: CSS only, no JS needed ✓
- interactive (x-ocaml): own universe reinit mechanism ✓
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1c5e32e0 Fix odoc build with OCaml 5.4.1: Data_types module migration
c31be687 Site updates
c5f2c361 Fix odoc doc build warnings: Tsig_include annotation, onnxrt refs, fatal warnings
68bbb7b2 Fix PPX spurious source links and same-module value linking in odoc
e7c7d887 Merge commit '07bc534031770950e35905270cc6916f76009aa0'
e9b5ed8a Constrain lwt < 6.1.0 (6.1.1 incompatible with oxcaml)
e9636bef Add new test and blog post
b66e7262 Alternative, simpler fix
git-subtree-dir: odoc
git-subtree-split: 1c5e32e0e12f06603becf9b1394f95ce7fc5409a
Dot extension: Replace per-diagram Js_inline scripts with a single
Js_url support file (dot-init.js) using MutationObserver pattern.
Store DOT source in <script type="text/dot"> elements to avoid
escaping issues. Fixes SPA navigation rendering.
Merlin config: Add stdlib path to build_path so dynamically loaded
packages (e.g. cmdliner via #require) resolve in merlin's type
checker. Previously only stdlib was set, causing red squiggly
errors on library references despite code compiling fine.
Widget_leaflet: Re-export Leaflet_map module from Widget_leaflet
so it's part of the public API. Add leaflet widget demo page.
Interactive extension demos: Move broken demos to .notyet:
- demo2_v2/v3: fake v1/v2 distinction (same cmdliner version)
- demo3_oxcaml: comprehensions extension disabled in compiler
- demo4_crossorigin: requires jon.ludl.am infrastructure
- demo5_multiverse: requires localhost:9090
- demo6/demo7: porting workshops need work
Fix demo_map and demo_widgets: add @x-ocaml.universe and
@x-ocaml.worker tags pointing to /_opam.
Simplify build-site.sh: remove redundant v2/v3 universe builds.
Sidebar: Add odoc-md to 'odoc Core' package group.
Scrollycode: Remove theme references from docs, align titles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace HTML blob with card styling and Google Fonts with plain odoc
markup using standard {ul} lists and cross-references.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4095c1af Constrain lwt < 6.1.0 (6.1.1 incompatible with oxcaml)
47c161ce Minor updates
1f56d069 Better source rendering
56c34e9a test: update json_expansion_with_sources test for pos_of_loc fix
825790c5 feat: add open/include tracking to source linking
77fbf3d4 feat: add record field references to source linking
dd8d0182 feat: add constructor references to source linking
8e072559 feat: re-enable documentation links from source code
21091826 fix: correct pos_of_loc end position in source annotations
git-subtree-dir: odoc
git-subtree-split: 4095c1afe288e6bf73c4ba8006cbc67d543913a7
5629c8d5 Add mdx as test dependency in odoc.opam
git-subtree-dir: odoc
git-subtree-split: 5629c8d594f948bfa9098e39d20afbc53f2f3ffb
265e6296 Fix scrollycode SPA navigation bug and add extensions authoring guide
21799997 WIP: site redesign, odoc extension API updates, and new content
e410f6cf jon-shell css: reduce body font to 16px and set x-ocaml editor font size
fc897c09 Add odoc-standalone package scaffolding
git-subtree-dir: odoc
git-subtree-split: 265e6296d2a506eff23ddb8f497a8cb379f7a866
New blog posts (monopam-madness, open-source-and-ai, weeknotes-2026-10),
notebook showcase with card layout and screenshots, Atom feed generator,
foundations notebook fixes, ONNX test improvements, widget interaction
tests, deploy script updates for oxcaml switch, and .gitignore for
build artifacts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The scrollycode JS runtime was embedded as an inline <script> in the
page body, which the SPA navigator never executes. Moved it to a
registered support file (extensions/scrollycode.js) loaded via Js_url
in <head>, with a MutationObserver to detect new containers inserted
by SPA content swaps.
Added a new "Writing Extensions" doc page to odoc covering the
extension API, resource types, the SPA navigation pitfall, and the
scrollycode fix as a case study.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both interactive and scrollycode extensions now check
_build/install/default/share/x-ocaml/x-ocaml.js (walking up from CWD)
before falling back to opam share. This avoids requiring 'dune install
x-ocaml' as a separate step.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71fe7ccd3 Merge branch 'point-release-fixes' of https://github.com/jonludlam/odoc
4d53f50da Make all warnings respect --warn-error
d1f796f14 Add test showing --warn-error doesn't affect unresolved references
d6c8ece57 Don't resolve imports without digests during compile
18adbf89b Add test for no-alias-deps import resolution bug
c3f0f46ee Update for dune 3.21
git-subtree-dir: odoc
git-subtree-split: 71fe7ccd36eee7f244a355653e10de197d6bcb94
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests addMarker, clearMarkers, addImageOverlay, removeImageOverlay
commands in a standalone HTML page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New commands:
- enableBboxDraw: custom rectangle drawing with bbox_drawn event
- addImageOverlay/removeImageOverlay: display data URL images on map
- addMarker/clearMarkers: circle markers with labels
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests PNG encoding and data URL generation in a web worker.
Verified: 4x4 RGBA image encodes to valid PNG, renders as <img>.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests run in a web worker (sync XHR requires worker context).
Fetches a real scales.npy from dl2.geotessera.org, parses it,
and verifies the shape and data values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Widen sidebar from 200px to 260px with updated max-width calculations
- Collapse top two wrapper levels so content aligns with header
- Add border-left indentation guides on nested lists
- Replace original toggle arrows with larger inline chevrons (1em, rotate on expand)
- Separate click targets: chevrons toggle expand/collapse, links navigate
- Align childless items with toggle items via 20px margin-left
- Fix CSS cascade where .jon-shell-main ul overrode sidebar ul padding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add browser test that compiles OCaml to JS via js_of_ocaml and verifies
fetch, npy parsing, and mosaic assembly work in a real browser.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of requiring every .mld file to specify @x-ocaml.universe and
@x-ocaml.worker tags individually, configure the default universe path
once in dune-workspace (--config x-ocaml.universe=/_opam). The shell
emits <meta> tags from config values, and per-page @x-ocaml tags can
still override them.
Changes:
- dune-workspace: add --config x-ocaml.universe=/_opam to html_flags
- gen_rules.ml: pass --config to odoc html-generate for @site build
- odoc_jon_shell.ml: emit <meta> tags from x-ocaml.* config values
- odoc generator.ml: pass config to shell page_creator
- interactive_extension.ml: upsert meta tags (update existing or create)
- x_ocaml.ml: infer jtw backend from x-ocaml-universe meta tag
- Remove @x-ocaml.universe/@x-ocaml.worker from 14 .mld files using
the default /_opam universe
- deploy-site.sh: add dune install x-ocaml, chmod fix, widget-leaflet
- findlibish.ml: module detection fallback via jsoo runtime
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generate tessera-viz.opam from dune-project. All odoc documentation
is in the .mli with section headers and docstrings for every public
type and function.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add color_of_hex for parsing hex color strings and classification_to_rgba
for mapping integer class predictions to colored RGBA pixels. Unknown
classes render as black. Add unit arg to resolve optional alpha parameter.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert 3-component PCA matrix to false-color RGBA image with
per-component percentile clipping and 0-255 scaling. Optional args
moved before positional to satisfy OCaml's optional-arg resolution.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add the tessera-viz library skeleton with dune-project, .mli interface,
and a working percentile function with linear interpolation. Other API
functions are stubbed with failwith for TDD iteration.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Generate opam file from dune-project. All 15 tests pass across grid
math, dequantization, mosaic, and fetch_mosaic_sync.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add end-to-end test for fetch_mosaic_sync using mock fetch function
with numpy fixture files. Verifies the full pipeline: bbox -> tile
enumeration -> fetch -> dequantize -> mosaic -> correct output values.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add mosaic tests verifying horizontal and vertical tile assembly.
North tiles appear at top (row 0), south at bottom. Confirms correct
grid position calculation and data placement.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add dequantization test with numpy fixtures (2x3x4 int8 embeddings,
2x3 float32 scales). Verifies correct int8 * scale multiplication
and output matrix dimensions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new tessera-geotessera library with dune project structure, public
API (.mli), and grid math implementation (snap_to_grid, tiles_for_bbox,
tile_name, URL construction). Includes full implementations of
dequantize, mosaic, and fetch_mosaic_sync. Grid math tests all pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add trailing-comma (1D shape) and scalar shape edge case tests
- Comprehensive .mli documentation with usage example
- Auto-generated opam file
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each foundations lecture now specifies @x-ocaml.universe and
@x-ocaml.worker so interactive code cells use the correct opam
package set.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Site pages (blog, notebooks) don't need the reference sidebar — it's only
for @doc output. Also adds the opam universe build step to deploy-site.sh,
copies odoc.support into the site tree, and refreshes the homepage with
recent entries and an about section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from server-rendered sidebar to JS-rendered sidebar from
sidebar_data JSON (same approach as odoc-docsite). On link clicks
within /reference/, fetch the page, swap .odoc-content, update title
and body class — no full reload. Back/forward via popstate.
- New odoc_jon_shell_js.ml: sidebar rendering, collapsible entries,
SPA navigation with click interception and resource deduplication
- odoc_jon_shell.ml: inject BASE_URL/CURRENT_URL/sidebar JSON in head,
register JS support file, empty sidebar container filled by JS,
extension resources moved to head for SPA discovery
- odoc_jon_shell_css.ml: collapsible toggle triangles, sidebar-label
styling for non-link entries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add sidebar pipeline: compile-index → sidebar-generate → html-generate --sidebar
- jon-shell: render sidebar nav with sticky CSS layout
- Convert all {@ocamltop blocks to {@ocaml for interactive extension
- odoc-interactive-extension: handle autorun (→ run-on=load) and skip tags
- Remove package prefix from URLs (parent-id uses "." for root pages)
- Add projects/index.mld placeholder, @children_order for notebooks
- Add (prefix reference) to dune-workspace for @doc output
- Update deploy-site.sh for two-pass build (site + reference docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the (documentation ...) stanza in site/dune with explicit
odoc compile → link → html-generate rules generated by a small OCaml
tool (site-builder/gen_rules.exe).
The generator walks site/ finding .mld files and static assets, then
emits two directory-target rules (compile+link → _odoc/, html-generate
+ support-files + assets → _html/) and a top-level @site alias.
Build the site with: dune build @site
Output lands in: _build/default/site/_html/
The committed site/dune.inc is kept in sync via dune build @runtest
(diff check against the generated output).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests the full end-to-end flow of runtime preloaded package detection:
- Preloaded package (yojson): succeeds without fetching .cma.js
- Normal package (stringext): fetches and loads from universe
- CRC mismatch (crc_conflict): raises Crc_mismatch with bogus CRC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- docsite shell: dispatch odoc-spa-loaded after SPA script loading,
matching the jon-shell implementation
- scrollycode: listen for odoc-spa-loaded to reinit after SPA nav
Plugins checked:
- mermaid: uses odoc-spa-loaded ✓
- dot: uses odoc-spa-loaded ✓
- msc: uses odoc-spa-loaded ✓
- scrollycode: uses odoc-spa-loaded ✓ (updated)
- admonition: CSS only, no JS needed ✓
- rfc: CSS only, no JS needed ✓
- interactive (x-ocaml): own universe reinit mechanism ✓
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1c5e32e0 Fix odoc build with OCaml 5.4.1: Data_types module migration
c31be687 Site updates
c5f2c361 Fix odoc doc build warnings: Tsig_include annotation, onnxrt refs, fatal warnings
68bbb7b2 Fix PPX spurious source links and same-module value linking in odoc
e7c7d887 Merge commit '07bc534031770950e35905270cc6916f76009aa0'
e9b5ed8a Constrain lwt < 6.1.0 (6.1.1 incompatible with oxcaml)
e9636bef Add new test and blog post
b66e7262 Alternative, simpler fix
git-subtree-dir: odoc
git-subtree-split: 1c5e32e0e12f06603becf9b1394f95ce7fc5409a
Dot extension: Replace per-diagram Js_inline scripts with a single
Js_url support file (dot-init.js) using MutationObserver pattern.
Store DOT source in <script type="text/dot"> elements to avoid
escaping issues. Fixes SPA navigation rendering.
Merlin config: Add stdlib path to build_path so dynamically loaded
packages (e.g. cmdliner via #require) resolve in merlin's type
checker. Previously only stdlib was set, causing red squiggly
errors on library references despite code compiling fine.
Widget_leaflet: Re-export Leaflet_map module from Widget_leaflet
so it's part of the public API. Add leaflet widget demo page.
Interactive extension demos: Move broken demos to .notyet:
- demo2_v2/v3: fake v1/v2 distinction (same cmdliner version)
- demo3_oxcaml: comprehensions extension disabled in compiler
- demo4_crossorigin: requires jon.ludl.am infrastructure
- demo5_multiverse: requires localhost:9090
- demo6/demo7: porting workshops need work
Fix demo_map and demo_widgets: add @x-ocaml.universe and
@x-ocaml.worker tags pointing to /_opam.
Simplify build-site.sh: remove redundant v2/v3 universe builds.
Sidebar: Add odoc-md to 'odoc Core' package group.
Scrollycode: Remove theme references from docs, align titles.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4095c1af Constrain lwt < 6.1.0 (6.1.1 incompatible with oxcaml)
47c161ce Minor updates
1f56d069 Better source rendering
56c34e9a test: update json_expansion_with_sources test for pos_of_loc fix
825790c5 feat: add open/include tracking to source linking
77fbf3d4 feat: add record field references to source linking
dd8d0182 feat: add constructor references to source linking
8e072559 feat: re-enable documentation links from source code
21091826 fix: correct pos_of_loc end position in source annotations
git-subtree-dir: odoc
git-subtree-split: 4095c1afe288e6bf73c4ba8006cbc67d543913a7
265e6296 Fix scrollycode SPA navigation bug and add extensions authoring guide
21799997 WIP: site redesign, odoc extension API updates, and new content
e410f6cf jon-shell css: reduce body font to 16px and set x-ocaml editor font size
fc897c09 Add odoc-standalone package scaffolding
git-subtree-dir: odoc
git-subtree-split: 265e6296d2a506eff23ddb8f497a8cb379f7a866
New blog posts (monopam-madness, open-source-and-ai, weeknotes-2026-10),
notebook showcase with card layout and screenshots, Atom feed generator,
foundations notebook fixes, ONNX test improvements, widget interaction
tests, deploy script updates for oxcaml switch, and .gitignore for
build artifacts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The scrollycode JS runtime was embedded as an inline <script> in the
page body, which the SPA navigator never executes. Moved it to a
registered support file (extensions/scrollycode.js) loaded via Js_url
in <head>, with a MutationObserver to detect new containers inserted
by SPA content swaps.
Added a new "Writing Extensions" doc page to odoc covering the
extension API, resource types, the SPA navigation pitfall, and the
scrollycode fix as a case study.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71fe7ccd3 Merge branch 'point-release-fixes' of https://github.com/jonludlam/odoc
4d53f50da Make all warnings respect --warn-error
d1f796f14 Add test showing --warn-error doesn't affect unresolved references
d6c8ece57 Don't resolve imports without digests during compile
18adbf89b Add test for no-alias-deps import resolution bug
c3f0f46ee Update for dune 3.21
git-subtree-dir: odoc
git-subtree-split: 71fe7ccd36eee7f244a355653e10de197d6bcb94
- Widen sidebar from 200px to 260px with updated max-width calculations
- Collapse top two wrapper levels so content aligns with header
- Add border-left indentation guides on nested lists
- Replace original toggle arrows with larger inline chevrons (1em, rotate on expand)
- Separate click targets: chevrons toggle expand/collapse, links navigate
- Align childless items with toggle items via 20px margin-left
- Fix CSS cascade where .jon-shell-main ul overrode sidebar ul padding
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of requiring every .mld file to specify @x-ocaml.universe and
@x-ocaml.worker tags individually, configure the default universe path
once in dune-workspace (--config x-ocaml.universe=/_opam). The shell
emits <meta> tags from config values, and per-page @x-ocaml tags can
still override them.
Changes:
- dune-workspace: add --config x-ocaml.universe=/_opam to html_flags
- gen_rules.ml: pass --config to odoc html-generate for @site build
- odoc_jon_shell.ml: emit <meta> tags from x-ocaml.* config values
- odoc generator.ml: pass config to shell page_creator
- interactive_extension.ml: upsert meta tags (update existing or create)
- x_ocaml.ml: infer jtw backend from x-ocaml-universe meta tag
- Remove @x-ocaml.universe/@x-ocaml.worker from 14 .mld files using
the default /_opam universe
- deploy-site.sh: add dune install x-ocaml, chmod fix, widget-leaflet
- findlibish.ml: module detection fallback via jsoo runtime
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add new tessera-geotessera library with dune project structure, public
API (.mli), and grid math implementation (snap_to_grid, tiles_for_bbox,
tile_name, URL construction). Includes full implementations of
dequantize, mosaic, and fetch_mosaic_sync. Grid math tests all pass.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Site pages (blog, notebooks) don't need the reference sidebar — it's only
for @doc output. Also adds the opam universe build step to deploy-site.sh,
copies odoc.support into the site tree, and refreshes the homepage with
recent entries and an about section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Switch from server-rendered sidebar to JS-rendered sidebar from
sidebar_data JSON (same approach as odoc-docsite). On link clicks
within /reference/, fetch the page, swap .odoc-content, update title
and body class — no full reload. Back/forward via popstate.
- New odoc_jon_shell_js.ml: sidebar rendering, collapsible entries,
SPA navigation with click interception and resource deduplication
- odoc_jon_shell.ml: inject BASE_URL/CURRENT_URL/sidebar JSON in head,
register JS support file, empty sidebar container filled by JS,
extension resources moved to head for SPA discovery
- odoc_jon_shell_css.ml: collapsible toggle triangles, sidebar-label
styling for non-link entries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add sidebar pipeline: compile-index → sidebar-generate → html-generate --sidebar
- jon-shell: render sidebar nav with sticky CSS layout
- Convert all {@ocamltop blocks to {@ocaml for interactive extension
- odoc-interactive-extension: handle autorun (→ run-on=load) and skip tags
- Remove package prefix from URLs (parent-id uses "." for root pages)
- Add projects/index.mld placeholder, @children_order for notebooks
- Add (prefix reference) to dune-workspace for @doc output
- Update deploy-site.sh for two-pass build (site + reference docs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the (documentation ...) stanza in site/dune with explicit
odoc compile → link → html-generate rules generated by a small OCaml
tool (site-builder/gen_rules.exe).
The generator walks site/ finding .mld files and static assets, then
emits two directory-target rules (compile+link → _odoc/, html-generate
+ support-files + assets → _html/) and a top-level @site alias.
Build the site with: dune build @site
Output lands in: _build/default/site/_html/
The committed site/dune.inc is kept in sync via dune build @runtest
(diff check against the generated output).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests the full end-to-end flow of runtime preloaded package detection:
- Preloaded package (yojson): succeeds without fetching .cma.js
- Normal package (stringext): fetches and loads from universe
- CRC mismatch (crc_conflict): raises Crc_mismatch with bogus CRC
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>