Wiki 格式設定

連結

Redmine 連結

在任何可以使用 Wiki 格式設定的地方, Redmine 都允許在資源(問題、變更集、 Wiki 頁面...)間建立超連結。

Wiki 連結:

您也可以連結至其他專案的 Wiki 頁面:

當頁面不存在的時候, Wiki 連結會以紅色的方式顯示,例如: Nonexistent page.

連結至其他資源:

逸出字元:

外部連結

HTTP URLs 與電子郵件地址會自動被轉換成可被點擊的連結:

http://www.redmine.org, someone@foo.bar

顯示為: http://www.redmine.org, someone@foo.bar

若您想要顯示指定的文字而非該 URL ,您可以使用下列標準的 textile 語法:

"Redmine web site":http://www.redmine.org

顯示為: Redmine web site

文字格式設定

對於諸如標題、粗體、表格、清單等項目, Redmine 支援使用 Textile 語法。可參考 http://en.wikipedia.org/wiki/Textile_(markup_language) 中關於使用這些格式化功能的說明資訊。 下面包含了一些使用範例,但格式化引擎的處理能力遠多於這些簡單的使用範例。

字型樣式

* *粗體*
* _斜體_
* _*粗斜體*_
* +底線+
* -刪除線-

顯示為:

內置圖像

標題

h1. 標題
h2. 次標題
h3. 次次標題

Redmine 為每一種標題指定一個 HTML 錨定 (anchor) ,因此您可使用 "#Heading" 、 "#Subheading" 等方式連結至這些標題。

段落

p>. 靠右對齊
p=. 置中對齊

這是一個置中對齊的段落。

引用文字

使用 bq. 開始一個引文的段落

bq. Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
To go live, all you need to add is a database and a web server.

顯示為:

Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern.
To go live, all you need to add is a database and a web server.

目錄

{{toc}} => 靠左對齊目錄
{{>toc}} => 靠右對齊目錄

水平線

---

巨集

Redmine 內建下列巨集:

hello_world

範例巨集。

macro_list

顯示所有可用巨集的清單,若巨集有提供說明也會一併顯示。

child_pages

Displays a list of child pages. With no argument, it displays the child pages of the current wiki page. Examples:

{{child_pages}} -- can be used from a wiki page only
{{child_pages(depth=2)}} -- display 2 levels nesting only
include

引入一個 wiki 頁面。例子:

{{include(Foo)}}

or to include a page of a specific project wiki:

{{include(projectname:Foo)}}
collapse

Inserts of collapsed block of text. Example:

{{collapse(View details...)
This is a block of text that is collapsed by default.
It can be expanded by clicking a link.
}}
thumbnail

Displays a clickable thumbnail of an attached image. Examples:

{{thumbnail(image.png)}}
{{thumbnail(image.png, size=300, title=Thumbnail)}}

程式碼醒目提示

預設使用 CodeRay 作為程式碼醒目提示的機制,它是一個使用 Ruby 撰寫的語法醒目提示函式庫。它目前支援 c 、 cpp 、 css 、 delphi 、 groovy 、 html 、 java 、 javascript 、 json 、 php 、 python 、 rhtml 、 ruby 、 scheme 、 sql 、 xml 與 yaml 等程式語言。

您可以使用下列語法,在 Wiki 頁面中將程式碼標示為醒目提示:

<pre><code class="ruby">
  將程式碼放在這裡。
</code></pre>

例子:

 1 # The Greeter class
 2 class Greeter
 3   def initialize(name)
 4     @name = name.capitalize
 5   end
 6
 7   def salute
 8     puts "Hello #{@name}!"
 9   end
10 end