How do I add syntax highlighting to a WordPress blog hosted on WordPress.com?

前端 未结 9 668
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-31 07:57

I\'d like to have a good syntax highlighter for my WordPress blog. What options do I have available? I often see one which has well-colored syntax highlighting and options to c

9条回答
  •  醉话见心
    2021-01-31 08:30

    The best way for syntax highlighting is using prismjs, which is completely free with awesome features.

    1. It has support for almost all programming languages, shell scripts and much more.

    2. It is very light weight and it will not bog down your sites speed like other syntax highlighting plugins.

    For configuring prismjs you need to do little code tweaks in your function.php file. Follow the turoails in this blog http://skillslane.com/setup-syntax-highlighter-for-wordpress/

提交回复
热议问题