Open toastal opened 1 year ago
Would you be up for a PR :)?
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.
I'll try to find some time to nixify this
Currently the syntax highlighting is done via a client-side highlighter downloaded from a CDN. There are problems with this approach:
<noscript>
is not supported; text is black on black so it's not remotely readable with JavaScript disabled out of limitations or security/privacy--and if the goal is to deliver content accessibly to the most folks, then lowering requirements should be favoredMoving syntax highlighting to the build phase would:
<pre>
block to highlighted is only executed once (memoized at build) emitting code with the appropriate CSS classes on the HTML