Title: Sunburst Code Prettify
Author: Rachel Baker
Published: <strong>2012 年 2 月 15 日</strong>
Last modified: 2012 年 5 月 2 日

---

搜尋外掛

這個外掛**並未在最新的 3 個 WordPress 主要版本上進行測試**。開發者可能不再對這個
外掛進行維護或提供技術支援，並可能會與更新版本的 WordPress 產生使用上的相容性問題。

![](https://s.w.org/plugins/geopattern-icon/sunburst-code-prettify.svg)

# Sunburst Code Prettify

 由 [Rachel Baker](https://profiles.wordpress.org/rachelbaker/) 開發

[下載](https://downloads.wordpress.org/plugin/sunburst-code-prettify.2.2.0.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/sunburst-code-prettify/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/sunburst-code-prettify/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/sunburst-code-prettify/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/sunburst-code-prettify/#developers)

 [技術支援](https://wordpress.org/support/plugin/sunburst-code-prettify/)

## 外掛說明

This plugin uses the [Sunburst theme](http://projects.serenity.de/textmate/), a 
colorful and high contrast dark theme to highlight your code syntax with [Highlight.js](http://softwaremaniacs.org/soft/highlight/en/).
Highlight.js is accurate, fast, lightweight and easy to use.

**Usage**

Short-code method:

 1. From within a WordPress page or post, wrap the `[prettify][/prettify]` shortcode
    around the code snippet you wish to highlight.
 2. You can specify a language by specifying the language extension inside the shortcode.
    
    Example: [prettify class=”html”][/prettify]
 3. The shortcode will work from within either the Visual or HTML editor.

Non-short-code method:

 1. Wrap your code snippets in “
 2. .
 3. You can specify a language by specifying a class in the `element.
     Example: <pre
    ><code class="html">

**Sunburst Only**

This plugin only contains the CSS file for the Sunburst theme syntax highlighting
formatting, because it is the best dark syntax theme. If (for some reason) you wanted
to highlight your code using a different theme, there are other syntax highlighting
themes available in the [Highlight.js Theme Gallery](http://softwaremaniacs.org/media/soft/highlight/test.html)

**Languages Supported:**

 * Bash
 * C#
 * C++
 * CSS
 * Diff
 * HTML, XML
 * Ini
 * Java
 * JavaScript
 * PHP
 * Perl
 * Python
 * Ruby
 * SQL

## 螢幕擷圖

 * [[
 * PHP code examples
 * [[
 * CSS code example
 * [[
 * HTML code example
 * [[
 * JavaScript code example
 * [[
 * Ruby code example

## 安裝方式

 1. Wrap code snippets in `[prettify][/prettify]` shortcode and it will guess the syntax
    being used and highlight the code.
 2. You can specify a language by specifying the language extension inside the shortcode.
    
    Example: [prettify class=”html”][/prettify] The class=”” specifies the language
    file extensions.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈Sunburst Code Prettify〉的開發相關工作。

參與者

 *   [ Rachel Baker ](https://profiles.wordpress.org/rachelbaker/)

[將〈Sunburst Code Prettify〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/sunburst-code-prettify)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/sunburst-code-prettify/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/sunburst-code-prettify/)，或
透過 [RSS](https://plugins.trac.wordpress.org/log/sunburst-code-prettify/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/sunburst-code-prettify/)。

## 變更記錄

#### 2.2.0

 * Changed syntax highlight script to Highlight.js for more accurate code detection.
 * Improved content stripping rules for WordPress code editor when the `[prettify]...[/
   prettify]` is wrapped around content.
 * Improved Sunburst CSS styles

#### 2.1.6

 * Added plain text color to CSS file
 * Adjusted spacing in CSS file
 * Updated copyright year in plugin.php file

#### 2.1.5

 * Added CSS parsing js file
 * Moved JS files into /js folder
 * Fixed missing files from 2.1 commit

#### 2.1

 * Added [prettify] shortcode
 * Automatically added the required onload=”prettyPrint()” to body tag with jquery

#### 2.0

 * Initial WordPress.org commit

## 中繼資料

 *  版本 **2.2.0**
 *  最後更新 **14 年前**
 *  啟用安裝數 **30+**
 *  WordPress 版本需求 ** 3.1 或更新版本 **
 *  已測試相容的 WordPress 版本 **3.4.2**
 *  語言
 * [English (US)](https://wordpress.org/plugins/sunburst-code-prettify/)
 * 標籤:
 * [code](https://tw.wordpress.org/plugins/tags/code/)[Highlight](https://tw.wordpress.org/plugins/tags/highlight/)
   [programming](https://tw.wordpress.org/plugins/tags/programming/)[syntax](https://tw.wordpress.org/plugins/tags/syntax/)
 *  [進階檢視](https://tw.wordpress.org/plugins/sunburst-code-prettify/advanced/)

## 評分

 5 星，滿分為 5 星

 *  [  1 個 5 星使用者評論     ](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/?filter=5)
 *  [  0 個 4 星使用者評論     ](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/?filter=4)
 *  [  0 個 3 星使用者評論     ](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/?filter=3)
 *  [  0 個 2 星使用者評論     ](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/?filter=2)
 *  [  0 個 1 星使用者評論     ](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/sunburst-code-prettify/reviews/)

## 參與者

 *   [ Rachel Baker ](https://profiles.wordpress.org/rachelbaker/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/sunburst-code-prettify/)