![]() Prismjs, the original syntax highlighter - if you don't mind client side js, this is definitely the one to consider.There are lots of syntax highlighting packages available, so let's briefly go through them and why they were not suitable for my use case: If you prefer to dive right into the code, check out the plugin on Github. This technical post documents my experience creating the syntax highlighter plugin and some things I learnt along the way. Hence, I decided to create one - rehype-prism-plus. However, I could not find a plugin that allows me to perform syntax highlighting of code blocks with features such as line numbers and line highlighting. Github flavour markdown, and do really cool things like automatically This makes it really easy to parse a file to support This is courtesy of the unifiedjs ecosystem which contains a variety of tools to parse markdown files,Īugment them with additional meta information and render them to HTML. One of the key features of the template is that it supports parsing markdown and mdx files into HTML blog posts. I have been working on improving my blog template over the past few months. Traversing and transforming the syntax tree.Adding line numbers and line highlighting. ![]() Syntax highlighting with prismjs and refractor.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |