From c794e33ddaab4e2f5278a2b5923365bdbd100eec Mon Sep 17 00:00:00 2001 From: giles Date: Sat, 28 Mar 2026 17:26:25 +0000 Subject: [PATCH] sx-http: load sxc/ components (~docs/page), auto-detect Docker paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Load sx/sxc/ directory for core layout components like ~docs/page, ~docs/section, ~docs/code. Auto-detect Docker (/app/sxc) vs dev (/project/sx/sxc) paths with SX_SXC_DIR env override. Fixes pages that use ~docs/page — all content pages now render correctly with full component expansion. Co-Authored-By: Claude Opus 4.6 (1M context) --- hosts/ocaml/bin/sx_server.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 5c5c0fe6..76bac756 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -1744,6 +1744,12 @@ let http_mode port = in load_dir lib_base; load_dir shared_sx; + (* sxc/ has core layout components like ~docs/page *) + let sx_sxc = try Sys.getenv "SX_SXC_DIR" with Not_found -> + let docker_path = project_dir ^ "/sxc" in + let dev_path = project_dir ^ "/sx/sxc" in + if Sys.file_exists docker_path then docker_path else dev_path in + load_dir sx_sxc; load_dir sx_sx; let t1 = Unix.gettimeofday () in Printf.eprintf "[sx-http] All files loaded in %.3fs\n%!" (t1 -. t0);