Sep 15, 2020

how to add code highlight in new version of Blogger 如何在新版的 Blogger 中上色程式碼

如果要在 Blogger 中將程式碼排版並上色,需要安裝第三方的工具


Resolution 解決方案

1. Open "Theme" >  click arrow from "CUSTOMIZE" menu > "Edit HTML"

打開 "主題" >  點擊"自訂"旁的箭頭 > "編輯 HTML"

 


 2.add code below after </title> tag then click save button

在 </title> 標籤後面加入以下的程式碼後按下儲存按鈕

<title><data:blog.pageTitle/></title>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/styles/agate.min.css"></link>
<script src='https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.2.0/highlight.min.js'></script>
<script>hljs.initHighlightingOnLoad();</script>    

3. in "HTML view" mode, add your code between <pre><code> and </pre></code>

在 "HTML 檢視" 模式中,將程式碼放在在標籤<pre><code> 與 </pre></code> 的中間


 

Reference 參考

https://therealweblog.blogspot.com/2019/05/how-to-format-code-snippets-in-blogger.html

 





Mar 16, 2017

Use Putty ssh with anonymously via tor

Tor can let you access internal anonymously.
Also, Tor can be a proxy so that you can using it with any protocols( http, ssh etc.).

Dec 14, 2016

Create fullrss text server to get rss feed full content



RSS feed sometimes provide partial conten even only title.

Now you can build a server to get rss full content for 3rd party reader (ex: feedly).



Nov 28, 2016

Create App Shortcuts in Windows 10 在Windows 10中建立APP的捷徑


When you right-click on apps, you cannot find the option for create shortcut on Windows 10.
If you want to create app shortcut , try these steps:
在 Windows 10 中朝著APP按右鍵並沒有建立捷徑的選項,
如果想要建立APP的捷徑,請試著以下的步驟。