diff --git a/.github/workflows/pfioooouuuu.yml b/.github/workflows/pfioooouuuu.yml index 22e427f..865f5d7 100644 --- a/.github/workflows/pfioooouuuu.yml +++ b/.github/workflows/pfioooouuuu.yml @@ -30,7 +30,7 @@ jobs: - run: opam install yourbones yourbones-ppx yourbones_js yourbones_js-beacon - run: opam install yocaml - run: opam install yocaml_unix yocaml_yaml yocaml_jingoo yocaml_syndication - - run: opam exec -- dune build --profile=release + - run: opam exec -- dune build - run: opam exec -- dune exec bin/capsule_cli/capsule.exe -- build - name: Deploy diff --git a/bin/capsule_client/capsule_client.ml b/bin/capsule_client/capsule_client.ml index 5b09828..450b4cb 100644 --- a/bin/capsule_client/capsule_client.ml +++ b/bin/capsule_client/capsule_client.ml @@ -1,6 +1,15 @@ open Js_of_ocaml open Nightmare_js +module Hljs = struct + let get () = Js.Unsafe.global##.hljs + + let mount () = + let hljs = get () in + let () = hljs##highlightAll in + Lwt.return () +end + let () = Suspension.allow () let () = @@ -10,3 +19,9 @@ let () = let id = Js.to_string container_id in Dapp_transfer.mount id end) + +let () = + Js.export "capsule_hljs" + (object%js + method run = Hljs.mount () + end) diff --git a/capsule.opam b/capsule.opam index 65ba2b0..344d0fc 100644 --- a/capsule.opam +++ b/capsule.opam @@ -29,7 +29,6 @@ depends: [ "yocaml_jingoo" {pinned} "yocaml_syndication" {pinned} "nightmare" {pinned} - "nightmare-dream" {pinned} "nightmare-tyxml" {pinned} "nightmare_js" {pinned} "nightmare_js-vdom" {pinned} diff --git a/templates/layout.html b/templates/layout.html index 2086c47..a8d2e5e 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -55,6 +55,9 @@