highlight 语法高亮


下载highlight.js

地址:https://highlightjs.org/download/

使用

直接引入css和js即可,最后必须载入一个script:

<script>hljs.initHighlightingOnLoad();</script>
pack支持的语言是:
Apache
Bash
C#
C++
CSS
CoffeeScript
Diff
Go
HTML,XML
HTTP
JSON/JSON with Comments
Java
JavaScript
Kotlin
Less
Lua
Makefile
Markdown
Nginx
Objective-C
PHP
Perl
Properties
Python
Ruby
Rust
SCSS
SQL(Structured Query Language)
Shell Session
Swift
TOML,also INI
TypeScript
YAML
plaintext

原文链接:https://blog.yongit.com/note/134088.html