前言介紹
- 這款 WordPress 外掛「SyHi」是 2009-11-01 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2010-11-18,距離現在已有 5579 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.8.5 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
sole |
外掛標籤
code | syntax | Highlight | whitespace | preformatting |
內容簡介
這個外掛完全是為開發人員而設計的。
你知道,那些經常在部落格發布程式碼片段且很少使用可視化編輯器的人,
因為他們自己撰寫 HTML 代碼,但他們不喜歡 WordPress 改變他們的引號和破折號,
因此這個外掛確保沒有人會動他們精心製作的代碼。
它也非常極簡 - 不到10k,不包括已包含的 GeSHi 語法突出顯示庫。
此外,它也很懶散。它會盡可能避免做太多的工作。
這很好,因為它不會像其他外掛一樣佔用資源。
使用
每當你要發布一些語法突出顯示代碼時,請使用<code lang="語言"></code>將它框起來。就是這樣。
例如:
<code lang="php">
class HelloWorld()
{
public function __construct()
{
echo "這是一個不必要冗長的Hello World版本";
}
}
</code>
“lang”屬性可以完全省略。您將獲得空格、引號和破折號的保存,但沒有突出顯示功能。
卸載
只需停用此外掛,並從“wp-content/plugins”目錄下刪除其資料夾。
致謝
非常感謝 GeSHi 库的創建者。沒有它,此外掛的輸出會非常無聊。
這是它的主頁:http://qbnz.com/highlighter/
以下外掛程式是啟發和指導的寶貴來源:
Preserve Code Formatting,由 Scott Reilly(http://coffee2code.com)
Code Snippet,由Roman Roan製作。 現由Wyatt Neal維護(http://blog.hackerforhire.org/code-snippet/)
您可以說,這個外掛是這兩個外掛的精華之和。
原文外掛簡介
This plug-in is totally designed for developers.
You know, that sort of people who post code snippets in their blog regularly and hardly use the Visual Editor,
because they write the HTML themselves. But they don’t like WordPress messing with their quotes and dashes,
so this plug-in makes sure no one touches one of their lovingly crafted lines of code.
It’s also very minimalistic – less than 10k, not counting the GeSHi syntax highlighting library which is also included.
In addition, it’s also lazy. It will try to avoid doing as much work as possible.
That is good, because it will not eat resources like other plug-ins out there.
Usage
Whenever you want to post some syntax highlighted code, surround it with . That’s it.
Example:
class HelloWorld()
{
public function __construct()
{
echo "This is an unnecessarily long version of Hello World";
}
}
The ‘lang’ attribute can be entirely omitted. You will get whitespace, quotes and dashes preservation… but no highlighting.
Uninstall
Just deactivate the plug-in, and remove its folder from the wp-content/plugins directory.
Thanks
Big thanks to the creators of the GeSHi library. Without it, the output of this plug-in would be very boring.
Here’s its homepage: http://qbnz.com/highlighter/
The following plug-ins were invaluable sources of inspiration and how-to-do-it-right:
Preserve Code Formatting, by Scott Reilly (http://coffee2code.com)
Code Snippet, by Roman Roan. Now maintained by Wyatt Neal (http://blog.hackerforhire.org/code-snippet/)
You could say this plug-in is the sum of the essence of both plug-ins.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「SyHi」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.0.2 | 0.0.3 | 0.0.4 | trunk |
延伸相關外掛(你可能也想知道)
Whitespace Fixer for XML Sitemap 》總結:Whitespace Fixer for XML Sitemap 是一個輕量級的外掛程式,可自動刪除 WordPress 輸出中 XML 宣告前的不需要空格或空行。, , 1. 什麼是 Whitespace F...。Empty Paragraph for TinyMCE Editor 》這是一個針對預設(TinyMCE)編輯器的非常簡單的外掛程式。它新增了一個按鈕,用來插入一個段落,這個段落不會被斷行咀(當您按下「發佈」時開始運作的元件)...。
KBSP Spacer & Ad Blocks 》**總結:**, KBSP Spacer & Ad Blocks 外掛可輕鬆在你的文章和頁面中插入預設的空白間距(1或2行)和單個廣告占位符(banner1)。它適用於經典編輯器和區...。KeepSpace 》<html>, <ul>, <li>WordPress 預設會刪除連續空格和前後空格。KeepSpace 外掛可以自動將常規空格轉換為特殊字符空格,以防止被省略。</...。
Hairspaces Around Dashes 》短橫線是常見的標點符號,其中長橫線 (—) 稱為 em dash,而短橫線 (–) 稱為 en dash。, 此外掛將環繞橫線的任何空格轉換為更小的 hairspaces,產生更優雅的排...。
