<%#-- copyright OpenProject is an open source project management software. Copyright (C) 2012-2024 the OpenProject GmbH This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: Copyright (C) 2006-2013 Jean-Philippe Lang Copyright (C) 2010-2013 the ChiliProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See COPYRIGHT and LICENSE files for more details. ++#%> <% content_for :styles do %> body { font:80% Verdana,Tahoma,Arial,sans-serif; } h1, h2, h3, h4 { font-family: Trebuchet MS,Georgia,"Times New Roman",serif; } pre, code { font-size:120%; } pre code { font-size:100%; } pre { margin: 1em 1em 1em 1.6em; padding: 2px; background-color: #fafafa; border: 1px solid #dadada; width:95%; overflow-x: auto; } a.new { color: #b73535; } .CodeRay .c { color:#666; } .CodeRay .cl { color:#B06; font-weight:bold } .CodeRay .dl { color:black } .CodeRay .fu { color:#06B; font-weight:bold } .CodeRay .il { background: #eee } .CodeRay .il .idl { font-weight: 600; color: #888 } .CodeRay .iv { color:#33B } .CodeRay .r { color:#080; font-weight:bold } .CodeRay .s { background-color:#fff0f0 } .CodeRay .s .dl { color:#710 } <% end %> <% html_title "Wiki Formatting" %>

Wiki Formatting

Links

OpenProject links

OpenProject allows hyperlinking between issues, changesets and wiki pages from anywhere wiki formatting is used.

Wiki links:

You can also link to pages of an other project wiki:

Wiki links are displayed in red if the page doesn't exist yet, eg: Nonexistent page.

Links to other resources:

Escaping:

External links

HTTP URLs and email addresses are automatically turned into clickable links:

https://www.openproject.org, someone@foo.bar

displays: https://www.openproject.org, someone@foo.bar

If you want to display a specific text instead of the URL, you can use the standard textile syntax:

"OpenProject web site":https://www.openproject.org

displays: OpenProject web site

Text formatting

For things such as headlines, bold, tables, lists, OpenProject supports Textile syntax. See http://www.textism.com/tools/textile/ for information on using any of these features. A few samples are included below, but the engine is capable of much more of that.

Font style

* *bold*
* _italic_
* _*bold italic*_
* +underline+
* -strike-through-

Display:

Inline images

Headings

h1. Heading
h2. Subheading
h3. Subsubheading

OpenProject assigns an anchor to each of those headings thus you can link to them with "#Heading", "#Subheading" and so forth.

Paragraphs

p>. right aligned
p=. centered

This is a centered paragraph.

Blockquotes

Start the paragraph with 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.

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.

Table of content

{{toc}} => left aligned toc
{{>toc}} => right aligned toc

Macros

OpenProject has the following builtin macros:

hello_world

Sample macro.

include

Include a wiki page. Example:

{{include(Foo)}}
macro_list

Displays a list of all available macros, including description if available.

Code highlighting

Code highlightment relies on CodeRay, a fast syntax highlighting library written completely in Ruby. It currently supports c, cpp, css, delphi, groovy, html, java, javascript, json, php, python, rhtml, ruby, scheme, sql, xml and yaml languages.

You can highlight code in your wiki page using this syntax:

<pre><code class="ruby">
  Place you code here.
</code></pre>

Example:

 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