使用 highlight.js
在页面中添加,如下代码 ^1
<link rel="stylesheet" href="/path/to/styles/default.css"> <script src="/path/to/highlight.pack.js"></script> <script>hljs.initHighlightingOnLoad();</script>
-
<link type="text/css" rel="Stylesheet" href="PATH/Styles/shThemeDjango.css"/> <script src="syntaxhighlighter.js"></script> <script> syntaxhighlighterConfig = { className: 'custom-class-name' }; </script>
Previous

2017-08-07
Next

2017-08-01