Wiki 格式設定 (Markdown)

連結

Redmine 連結

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

Wiki 連結:

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

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

連結至其他資源:

逸出字元:

外部連結

URLs (starting with: www, http, https, ftp, ftps, sftp and sftps) and email addresses are automatically turned into clickable links:

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

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

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

[Redmine web site](http://www.redmine.org)

會顯示成: Redmine web site

文字格式設定

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

字型樣式

* **粗體**
* *斜體*
* ***粗斜體***
* ~~刪除線~~

會顯示成:

內嵌圖像

標題

# 標題
## 次標題
### 次次標題

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

區塊引述

使用 > 啟動一個區塊引述的段落。

> 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.

Display:

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

顯示子頁面的清單。 若未指定參數,它將會顯示目前 Wiki 頁面的子頁面清單。 範例:

{{child_pages}} -- 僅可於某 Wiki 頁面中被使用
{{child_pages(depth=2)}} -- 僅顯示兩層巢狀層次
include

引入一個 wiki 頁面。範例:

{{include(Foo)}}

或用以引入某特定專案的 Wiki 頁面:

{{include(projectname:Foo)}}
collapse

插入一個摺疊的文字區塊。範例:

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

顯示可被點擊的附加圖像之縮圖。範例:

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

Inserts a link to an issue with flexible text. Examples:

{{issue(123)}}                              -- Issue #123: Enhance macro capabilities
{{issue(123, project=true)}}                -- Andromeda - Issue #123:Enhance macro capabilities
{{issue(123, tracker=false)}}               -- #123: Enhance macro capabilities
{{issue(123, subject=false, project=true)}} -- Andromeda - Issue #123

程式碼醒目提示

Default code highlightment relies on Rouge, a syntax highlighting library written in pure Ruby. It supports many commonly used languages such as c, cpp (c++), csharp (c#, cs), css, diff (patch, udiff), go (golang), groovy, html, java, javascript (js), kotlin, objective_c (objc), perl (pl), php, python (py), r, ruby (rb), sass, scala, shell (bash, zsh, ksh, sh), sql, swift, xml and yaml (yml) languages, where the names inside parentheses are aliases. Please refer to https://www.redmine.org/projects/redmine/wiki/RedmineCodeHighlightingLanguages for the full list of supported languages.

您可載任何支援 Wiki 格式設定的地方,使用這個語法來醒目提示程式碼 (注意語言與其別名的名稱不須區分大小寫):

``` ruby
  將程式碼放在這裡。
```

範例:

# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!"
  end
end