<script src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shCore.js" type="text/javascript"></script> <script src="http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shAutoloader.js" type="text/javascript"></script> <script type="text/javascript"> (function() { var loadCssFile = function(href) { var link = document.createElement("link"); link.rel = "stylesheet"; link.href = href; link.type = "text/css" document.getElementsByTagName('head')[0].appendChild(link); }; loadCssFile("http://alexgorbatchev.com/pub/sh/3.0.83/styles/shThemeEclipse.css"); loadCssFile("http://alexgorbatchev.com/pub/sh/3.0.83/styles/shCore.css"); SyntaxHighlighter.autoloader( 'applescript http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushAppleScript.js', 'actionscript3 as3 http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushAS3.js', 'bash shell http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushBash.js', 'coldfusion cf http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushColdFusion.js', 'cpp c http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushCpp.js', 'c# c-sharp csharp cs http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushCSharp.js', 'css http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushCss.js', 'delphi pascal http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushDelphi.js', 'diff patch pas http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushDiff.js', 'erl erlang http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushErlang.js', 'groovy http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushGroovy.js', 'java http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushJava.js', 'jfx javafx http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushJavaFX.js', 'js jscript javascript http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushJScript.js', 'perl pl http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushPerl.js', 'php http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushPhp.js', 'text plain http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushPlain.js', 'py python http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushPython.js', 'ruby rails ror rb http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushRuby.js', 'sass scss http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushSass.js', 'scala http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushScala.js', 'sql http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushSql.js', 'vb vbnet http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushVb.js', 'xml xhtml xslt html http://alexgorbatchev.com/pub/sh/3.0.83/scripts/shBrushXml.js' ); SyntaxHighlighter.config.stripBrs = true; SyntaxHighlighter.config.bloggerMode = true; SyntaxHighlighter.defaults.toolbar = false; SyntaxHighlighter.all(); })(); </script>
2012-02-24
SyntaxHighliterをBloggerに導入
プログラムコードを表示するために、SyntaxHighliterを導入しています。SyntaxHighliterをブロガーに簡単にインストールできるように、下記のスクリプトを作成して埋め込んでいます。これをHTML/JavaScriptガジェットにコピペすれば導入完了です。(SyntaxHighliterの使い方の詳細については作者Webページを参照してください。)
登録:
コメントの投稿 (Atom)
0 件のコメント:
コメントを投稿