在任何使用文本格式的地方,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
如果您想要显示指定的文本而不是链接,您可以通过下列标准的 textile 语法:
"Redmine 官网":http://www.redmine.org
显示为: Redmine 官网
对于像是标题、粗体、表格、列表等文字格式, Redmine 支持使用 http://en.wikipedia.org/wiki/Textile_(markup_language) 查找关于使用这些特性的信息。下面将展示其中的一些常用的语法。
* *粗体* * _斜体_ * _*粗体 斜体*_ * +下划线+ * -中划线-
显示为:
h1. 一级标题 h2. 二级标题 h3. 三级标题
你可以使用“#一级标题”、“#二级标题”等等来链接到这些标题
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
显示一个子页面列表。默认显示当前Wiki页面的所有子页面。 示例:
{{child_pages}} -- 只能在Wiki页面调用
{{child_pages(depth=2)}} -- 显示两级子页面
include
引用一个Wiki页面。示例:
{{include(Foo)}}
或者引用一个指定项目的Wiki页面:
{{include(projectname:Foo)}}
collapse
插入一个折叠文本块。示例:
{{collapse(View details...)
这是一个默认折叠的文本块。
点击链接后将会展开此文本块.
}}
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.
You can highlight code at any place that supports wiki formatting using this syntax (note that the language name or alias is case-insensitive):
<pre><code class="ruby"> 这里写 Ruby 代码 </code></pre>
示例:
# The Greeter class
class Greeter
def initialize(name)
@name = name.capitalize
end
def salute
puts "Hello #{@name}!"
end
end