hepek
hepek copied to clipboard
Explore "server-side" rendering options
We could get a performance benefit from not-loading all those prismjs mini scripts.
Prismjs supports server-side rendering, see "Usage with Node" section: https://prismjs.com/
We could feed the code through Nashorn or something: https://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/
Katex also supports it: https://katex.org/docs/api.html#server-side-rendering-or-rendering-to-a-string
https://golb.hplar.ch/2020/04/java-javascript-engine.html#:~:text=The%20GraalVM%20JavaScript%20engine%20is,Nashorn%20only%20supports%20ECMAScript%205.1.
https://github.com/SeanSobey/ChartjsNodeCanvas