FORMAT MY SOURCE CODE FOR BLOGGING
http://formatmysourcecode.blogspot.tw/
測試內容
幫 Blogger 文章鎖上密碼
方案1(重編輯後會不能用…)
http://apps.kerthis.com/encrypt-post/
方案2(推)
http://freeingcockatiel.blogspot.tw/2014/02/google-blog.html
http://xox520.blogspot.com/2011/04/hide-post-in-blogger.html
加密位置
http://www.vincentcheung.ca/jsencryption/
http://xox520.blogspot.com/p/encoder.html?m=1
Demo 測試用密碼:test
SyntaxHighlighter
http://pydoing.blogspot.tw/2010/11/syntaxhighlighter-blogger.html
http://blog.xuite.net/andy19890411/Orz/37326267
http://alexgorbatchev.com/SyntaxHighlighter/download/
https://github.com/syntaxhighlighter
Demo
func getCurrentDateTimeString()->String{ let date = NSDate() let calendar = NSCalendar.currentCalendar() let components = calendar.components([.Year, .Month, .Day, .Hour, .Minute, .Second, .Weekday, .WeekdayOrdinal] , fromDate: date) let year = components.year let month = String(format: "%02d", components.month) let day = String(format: "%02d", components.day) let hour = String(format: "%02d", components.hour) let minute = String(format: "%02d", components.minute) let dateTimeString = "\(year)\(month)\(day)\(hour)\(minute)" print("dateTimeString: \(dateTimeString)") return dateTimeString }
用法
<pre class="brush: swift;"> //程式碼 </pre>
使用<pre></pre>區塊必須先將 "&"改成&、"<"改成<、">"改成>
JavaScript code prettifier https://github.com/google/code-prettify
Import js
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
use bsh, c, cc, cpp, cs, csh, cyc, cv, htm, html, java, js, m, mxml, perl, pl, pm, py, rb, sh, xhtml, xml, xsl
<pre class="prettyprint">
<code class=“sh">
<!— code在這,最好都貼著左邊線 —>
</code>
</pre>
網友設計的Style
https://eric0806.blogspot.tw/2014/04/blogger-google-code-prettify.html
留言
張貼留言