o1-labs / ocamlbyexample

Learn Ocaml by reading code examples
https://o1-labs.github.io/ocamlbyexample/
68 stars 4 forks source link

Highlight syntax on build, not in browser #17

Open toastal opened 1 year ago

toastal commented 1 year ago

Currently the syntax highlighting is done via a client-side highlighter downloaded from a CDN. There are problems with this approach:

Moving syntax highlighting to the build phase would:

mimoo commented 1 year ago

Would you be up for a PR :)?

toastal commented 1 year ago

Maybe? I've used OCaml to do syntax highlighting using a custom Lambda Soup script, but I'm not sure what's the best way to handle in this sort of environment. If there was a flake.nix I could add a dependency, but I don't know what's the best here.

mimoo commented 1 year ago

I'll try to find some time to nixify this