<script type="text/javascript"> alert(1); alert(2); var Bear = {}; </script>http://jimchung1221.pixnet.net/blog/post/9425133-如何在blogger上加上syntax-highlight
如果網站的不知援外部運算
那就土法煉鋼
連上下面那個網站
http://www.tohtml.com/html/
把你的source code貼上後
按下"Highlight"
再把產生對應的HTML貼到網頁即可
How to Add Syntax Highlighter(v3) to Blogger Blogs
http://www.way2blogging.org/2011/03/how-to-add-syntax-highlighterv3-to.html
http://www.way2blogging.org/widget-generators/syntax-highlighter-scripts-generator (checkbox在字的右邊)
SyntaxHighlighter Configuration
http://alexgorbatchev.com/SyntaxHighlighter/manual/configuration/
<pre class='brush:[brushname];'> </pre>
<pre class="brush: js; ruler: true; first-line: 10; highlight: [2, 4, 6]">...</pre>12345
各個語言的brush對照表
http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/
上面那個表格製作方法:
20200415 修正https時syntax highlight 失效問題
找出當時這些外連資源在哪加入的https://support.google.com/blogger/answer/176245?hl=zh-Hant
主題 => 「網誌即時狀態(...)」之下,按一下 [編輯 HTML]
將 http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js 改成 https://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shCore.js
其他亦同
避免 http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js 轉跳到 https://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shCore.js 時瀏覽器報mixed content 的錯誤
20220811 換成 cloudflare CDN
因為 https://agorbatchev.typepad.com/pub/sh/3_0_83/scripts/shBrushPhp.js 404 ,所以換成 https://cdnjs.cloudflare.com/ajax/libs/SyntaxHighlighter/3.0.83/scripts/shBrushPhp.js