Skip to content

highlight.js官方推荐插件,用于代码前显示行号,并且支持自定义行号颜色等,本fork是为了兼容jekyll

License

Notifications You must be signed in to change notification settings

y377/highlight.ln.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

highlightjs代码高亮官方推荐插件,jekyll适配版,个人强烈推荐

本人菜鸟,不太会JavaScript和css/sass,勉强捣鼓html,但是我会修改,我就用jekyll、bootstrap、highlightjs和highlight.ln.js终于“拼凑”起来了,敬请期待完工后的效果
image

Thank the original author for writing such a good plug-in

非常感谢原作者写出这么好的插件并且帮助我修改

如何使用?how t use?

for jekyll

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;
}

Browsers

<script src="https://cdn.jsdelivr.net/gh/highlightjs/[email protected]/build/highlight.js"></script>
<script src="/your_path/highlight.ln.js"></script>
<script>
  hljs.highlightAll();
  hljs.configure({ ignoreUnescapedHTML: true });//防止什么注入攻击?
</script>

License

BSD

About

highlight.js官方推荐插件,用于代码前显示行号,并且支持自定义行号颜色等,本fork是为了兼容jekyll

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 62.4%
  • SCSS 37.6%