crisp
crisp copied to clipboard
Change syntax highlighter to Prism
I noticed the syntax highlighting used - highlight.js
- was... less than satisfactory, and really messed with the otherwise brilliant and stylish feel of the theme. So I changed it to Prism (which is of course open-source and under a permissive license - MIT, to be exact), fixed up the style a bit extra to fit even better with Crisp and work well on mobile, and I gotta say: the results are wonderful. Here, take a look at some examples - just make sure to click them to get the full-res experience.
Example 1, current style (highlight.js
):
Example 1, new style (Prism):
Example 2, current style (highlight.js
):
Example 2, new style (Prism):
Way better, right? I think so, at least. With this PR, Crisp comes with documented support for HTML, CSS, JavaScript, Handlebars, C, C++, C#, C-likes, Python and Ruby, and is easily extensible by any user by following the instructions in the readme. It affects both triple-tick code blocks and inline ones with a unified style.
You can check out a live blog post with the changes implemented here; just scroll down a bit.