前言介紹
- 這款 WordPress 外掛「Goodbye Syntax Highlighter」是 2012-08-13 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2013-02-11,距離現在已有 4468 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.1 以上版本才可以安裝。
- 有 1 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
pre | code | syntax | Highlight | highlight.js |
內容簡介
多年來,我一直使用 Alex Gorbatchev 的 SyntaxHighlighter 。多年以來,它一直為我服務良好。當我轉移到 WordPress 後,我嘗試了基於該庫的各種插件,如 SyntaxHighlighter Evolved。
我決定開始使用 Markdown 進行博客寫作。進行這次轉換時,我需要找到一種簡單的方法來突顯各種源代碼。有很多漂亮的庫使這變得簡單,例如 google-code-prettify 或 highlight.js。最終,我決定採用 highlight.js,因為它是自動化的,與 Markdown 的代碼語法輸出完美無瑕地配合。
很好,但我的現有源代碼示例使用 SyntaxHighlighter 對代碼塊的樣式進行格式化(例如使用
)。我可以以幾種方式轉換它們:更改數據庫
寫一個 JS 腳本將
編寫 JS 腳本調用 highlight.js 的 highlightBlock 方法
撰寫 WP 插件並輕鬆重格式化它 Ding Ding Ding
因此,這個 WordPress 插件將處理您的 SyntaxHighlighter 样式塊,使它們可以與 highlight.js out-of-the-box 配合。它還會將您使用 brush 類指定的語言添加為 元素的類,遵循 HTML5 建議(following the HTML5 recommendation)。不會更改數據庫,因此,如果您決定返回 SyntaxHighlighter,則可以毫不費力地進行。
GeSHi
此插件現在支援轉換 GeSHi 样式的代碼塊!現在,您可以將插件從 WP-Syntax 和 WP-GeSHi-Highlight 轉換為 highlight.js。
GeSHi 使用的語法與 SyntaxHighlighter 接近,但是它不是將語言放在 class 屬性中,而是使用 lang 屬性。與 SyntaxHighligher 轉換類似,它將處理您的 GeSHi 样式塊,使其可以與 highlight.js out-of-the-box 配合。它還會將您使用 lang 屬性指定的語言添加為 元素的 class。
原文外掛簡介
For years I’ve used Alex Gorbatchev’s SyntaxHighlighter. It has served me well over the years. When I moved to WordPress I tried various plugins based on the library, such SyntaxHighlighter Evolved.
I’ve decided to start blogging using Markdown. Making this move I needed to find a way to highlight various bits of source code in an easy way. There are many nice libraries that make this a snap, such as google-code-prettify or highlight.js. In the end I decided to go with highlight.js, for the simple reason that it is automatic, working flawlessly with Markdown’s code syntax output.
Great, but my existing source code examples use SyntaxHighlighter’s style for code blocks (using
Write a JS script to call highlight.js’ highlightBlock method
Write a WP plugin and reformat things easily Ding Ding Ding
So there you have it. This WordPress plugin will go through and process your SyntaxHighlighter style blocks into ones that highlight.js works with out-of-the-box. It will also add the language that you have specified with the brush class and add it as a class on the element (following the HTML5 recommendation). Nothing is changed in the DB, so if you decide to go back to SyntaxHighlighter, you can without any issues.
GeSHi
This plugin now supports conversion of GeSHi style code blocks! Now you can move from plugins such as WP-Syntax and WP-GeSHi-Highlight to highlight.js.
GeSHi uses the syntax that is close to SyntaxHighlighter, except instead of putting the language in the class attribute, it uses the lang attribute. Similar to the SyntaxHighligher conversion, it will go through and process your GeSHi style blocks into ones that highlight.js works with out-of-the-box. It will also add the language that you have specified with the lang attribute and add it as a class on the element.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Goodbye Syntax Highlighter」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1.0 | 0.1.1 | 0.1.2 | trunk |
延伸相關外掛(你可能也想知道)
String locator 》當你在開發主題和外掛時,你經常會注意到某些文字被硬編碼在文件中,你需要對其進行修改,但你不知道該主題或外掛的名稱,更不知道要查找哪個文件。, 你可以...。
Highlight Search Terms 》這款WordPress外掛能夠在搜索結果頁面上和每個與搜索結果相關聯的文章頁面上突出顯示搜索詞。該外掛輕量且沒有任何選項。它起初是與Thaya Kareeson的《如何使...。
WP-Syntax 》WP-Syntax 提供乾淨的語法突顯,使用 GeSHi,支援多種流行的語言,包括有或沒有行號的語法突顯,可以在從瀏覽器中複製程式碼片段時保持格式。, 它通過運行早...。
Prismatic 》唯一的 3 合 1 語法高亮插件!, 使用 Prism.js、Highlight.js 或純文字轉義顯示美麗的程式碼片段:, , Prism.js – 使用 Prism.js 轉義和語法高亮, Highlight....。
Highlight and Share – Social Text and Image Sharing 》在您的內容中與您的讀者見面。, 當用戶與您的文字互動時,顯示社交網絡選項(了解 Highlight and Share 如何工作)。, Highlight and Share 具有以下主要功能...。
Custom Highlight Color 》許多裝置和瀏覽器在選擇網站上的文字時提供不太理想的顏色。使用者可能出於習慣閱讀,或是想分享引言等各種原因選擇文字。此外掛可讓您在自訂檢視器中進行即...。
CodeColorer 》CodeColorer 是一個外掛程式,它可以讓您在文章中插入代碼片段並添加漂亮的語法高亮效果。, 此外掛程式基於 GeSHi庫建立,支援大多數語言。CodeColorer 的各...。
Code Prettify 》此外掛為自定版的Code Prettify library,支援本地樣式和腳本。此外掛會自動為頁面上的所有
標籤應用代碼高亮。, 支援古騰堡,且不會將您鎖定在特...。
Tooltipy (tooltips for WP) 》, 此外掛可讓你自動建立適應性工具提示方塊,以解釋專有名詞,讓使用者更舒適地瀏覽網站。, 使用簡碼詞彙表 [kttg_glossary]。, , , 展示, , 實際展示, 管理...。
Text Selection Color 》Text Selection Color 外掛可幫助輕鬆更改網站中已選取文字的顏色。, 功能:, , 使用者可透過外掛設定頁面中的顏色選擇器變更文字顏色和文字背景顏色。, 變更...。
Just Highlight 》Just Highlight 是一個 WordPress 外掛,可用於在文章或頁面中突顯文字,讓您輕鬆創建突顯閱讀者真正關心的內容的美觀文章。, 如何使用?, * 使用游標選擇...。
Featured Post with thumbnail 》這個外掛可以讓你在網誌的側邊欄中的任何地方添加一個區域,專門用於突出顯示你想要強調呈現的文章。它的使用非常簡單:安裝和啟用後,你可以決定將哪些文章...。
WP-GeSHi-Highlight — rock-solid syntax highlighting for 259 languages 》• 現場示範, • 亮點:, , 支援259種程式語言。, 適用於行動裝置:無需執行JavaScript,與基於JavaScript的解決方案相比可節省頻寬和電力。, 後端負載接近零。...。
Mark New Posts 》突顯 WordPress 文章的未讀狀態。, 功能:, , 開箱即用, 提供四種不同的標記方式突顯文章:, , 文字標籤(新!), 橘色圓圈, 圖片, 旗幟圖示, , , 可選擇當何...。
WP SyntaxHighlighter 》這個外掛是一個基於Alex Gorbatchev的SyntaxHighlighter ver. 3.0.83和2.1.382的程式碼語法加亮工具。, 功能特點, , 基於Alex Gorbatchev的"SyntaxHighl...。