【问题标题】:Code formatting SyntaxHighlighter for blogger throws error博主的代码格式化 SyntaxHighlighter 抛出错误
【发布时间】:2014-06-20 13:20:12
【问题描述】:
【问题讨论】:
标签:
syntax-highlighting
blogger
【解决方案4】:
我在模板头部分的末尾写了这个:
<link href='http://alexgorbatchev.com/pub/sh/current//styles/shCore.css' rel='stylesheet' type='text/css'/>
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css' rel='stylesheet' type='text/css'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushBash.js'/>
<script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPlain.js'/>
<script>
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = "http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf";
SyntaxHighlighter.all();
</script>
接下来我在文章中写道:
<pre class="brush:bash">
ls -al | grep .jpg
</pre>
你可以举例here看。