highlightjs代码高亮官方推荐插件,jekyll适配版,个人强烈推荐
本人菜鸟,不太会JavaScript和css/sass,勉强捣鼓html,但是我会修改,我就用jekyll、bootstrap、highlightjs和highlight.ln.js终于“拼凑”起来了,敬请期待完工后的效果
Thank the original author for writing such a good plug-in
非常感谢原作者写出这么好的插件并且帮助我修改
you need custom css/scss:
pre .hljs[style]:first-child {
background: black !important;
border-right-color: cyan !important; /* here to change the border color */
color: white !important;
}
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.3.1/build/highlight.js"></script>
<script src="/your_path/highlight.ln.js"></script>
<script>
hljs.highlightAll();
hljs.configure({ ignoreUnescapedHTML: true });//防止什么注入攻击?
</script>
BSD