This commit is contained in:
Tommy Parnell
2022-03-11 01:35:34 -05:00

View File

@@ -1 +1 @@
This is an azure nodejs function that parses and runs prism on the server. This is used by my blog which does not run Node and cannot use prism. I don't use prism's JS file on the client to avoid any lighthouse impact
This is a azure nodejs function 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.