2 lines
589 B
Markdown
2 lines
589 B
Markdown
This is a fastify nodejs server that parses and runs prism on the server. [PrismJS](https://prismjs.com/) is a Syntax highlighting tool. This web api used by my blog which does not run Node and cannot use prism. I wanted syntax highlighting but didn't want to take the performance hit for loading JS and parsing the code client side. This replaces markdown fenced code with the HTML equivilent parsed for prism. [My blog](https://blog.terrible.dev) only loads the Prism css which is only an extra 1k. I avoided using the JS so I can serve AMP pages, and also keep my 100 lighthouse score.
|