Documentation is written in HTML to quickly and easily write and styilze content. HTML was chosen over other formats such as Markdown and Textile as we all should already have a basic knowledge of HTML and it provides more flexibility in styling the content.
The default stylesheet covers the basic use of HTML tags where additional stylesheet classes are available to further stylize certain content. In addition, template tags exist to help author documentation content by parsing the content through PHP.
##TODO##
HTML tags are automatically stylized through basic stylesheet definitions.
Headings are written with the standard <hX> tags, where X is a priority number from 1, the main and biggest heading, to 6, the smallest heading. Each documentation page must start with and contain only one <h1> heading level; subsequent headings must use <h2> to <h6> depending on the hierarchy level.
Headings are written as:
<h1>Main Heading</h1>
Each page has an automatically generated table of contents list that is built on the heading hierarchy level from <h2> onwards. Headings that should not be included in the table of contents must have a defined stylesheet class of notoc:
<h3 class="notoc">Section Heading</h3>
Headings can contain sub-headings by wrapping the sub-heading in the main heading with the <small> tag.
Sub-Headings are written as:
<h1>Main Heading <small>Sub-Heading</small></h1>
Paragraphs are written with the standard <p> tag. Paragraphs are not automatically created by new lines so the <p> tag must be used.
<p>This is a paragraph.</p>
Peregrephs ere-a vreettee veet zee stunderd <p> teg. Peregrephs ere-a nut ootumeteecelly creeted by noo leenes su zee <p> teg moost be-a used. Bork bork bork!
Important paragraphs can stand out by using the lead stylesheet class:
<p class="lead">This is an important paragraph.</p>
This is an important paragraph.
New lines are written with the standard <br /> tag.
<p>
Line 1<br />
Line 2<br />
Line 3
</p>
Line 1
Line 2
Line 3
Smaller text can be shown in the current scope with the <small> tag.
<p>This is normal sized text <small>and this text will appear smaller</small></p>
This is normal sized text and this text will appear smaller
Text can be emphasized in a heavier font weight with the <strong> tag.
<p>This is normal text <strong>and this text is rendered in bold</strong>.</p>
This is normal text and this text is rendered in bold.
Text can be emphasized in italics with the <em> tag.
<p>This is normal text <em>and this text is rendered in italics</em>.</p>
This is normal text and this text is rendered in italics.
Text can be underlined with the <u> tag.
<p>This is normal text <u>and this text is underlined</u>.</p>
This is normal text and this text is underlined.
Text can be emphasized in colours with the following stylesheet classes:
<p class="muted">This text will be coloured in grey.</p>
<p class="text-warning">This text will be coloured in yellow.</p>
<p class="text-error">This text will be coloured in red.</p>
<p class="text-info">This text will be coloured in blue.</p>
<p class="text-success">This text will be coloured in green.</p>
This text will be coloured in grey.
This text will be coloured in yellow.
This text will be coloured in red.
This text will be coloured in blue.
This text will be coloured in green.
A list of items with no priority of order is written as:
<ul>
<li>List item 1</li>
<li>List item 2
<ul>
<li>Sub list item 1</li>
<li>Sub list item 2</li>
</ul>
</li>
<li>List item 3</li>
<li>List item 4</li>
</ul>
A list of items in specific order is written as:
<ol>
<li>List item 1</li>
<li>List item 2
<ol>
<li>Sub list item 1</li>
<li>Sub list item 2</li>
</ol>
</li>
<li>List item 3</li>
<li>List item 4</li>
</ol>
An unstyled list can be produced by using the unstyled stylesheet class:
<ul class="unstyled">
<li>List item 1</li>
<li>List item 2</li>
<li>List item 3</li>
<li>List item 4</li>
</ul>
A list of terms with their associated descriptions is written as:
<dl>
<dt>Title 1</dt>
<dd>Description 1</dd>
<dt>Title 2</dt>
<dd>Description 1</dd>
<dd>Description 2</dd>
</dl>
A bulleted list of terms can be produced by using the bulleted stylesheet class:
<dl class="bulleted">
<dt>Title 1</dt>
<dd>Description 1</dd>
<dt>Title 2</dt>
<dd>Description 1</dd>
<dd>Description 2</dd>
</dl>
A horizontal list of terms can be produced by using the dl-horizontal stylesheet class:
<dl class="dl-horizontal">
<dt>Title 1</dt>
<dd>Description 1</dd>
<dt>Title 2</dt>
<dd>Description 1</dd>
<dd>Description 2</dd>
</dl>
Formatted code can be produced by using the {code} template tag:
{code} <?php $date = date('jS F, Y', 802562400); echo '[' . $date . '] These tools are a set of small tight cgi binaries written in C. They perform a number of functions to allow you to implement a guestbook or any other form that needs to write information and display it to users later in about 2 minutes.'; ?> {code}
<?php
$date = date('jS F, Y', 802562400);
echo '[' . $date . '] These tools are a set of small tight cgi binaries written in C. They perform a number of functions to allow you to implement a guestbook or any other form that needs to write information and display it to users later in about 2 minutes.';
?>
Plain code can be written as:
<pre>
<?php
$trap = new Acme('tnt');
$wile->setState('ready');
while ( true ) {
if ( $wile->hears('meepmeep') ) {
$trap->trigger();
return $wile->getResult();
}
sleep(1);
}
?>
</pre>
<?php $trap = new Acme('tnt'); $wile->setState('ready'); while ( true ) { if ( $wile->hears('meepmeep') ) { $trap->trigger(); return $wile->getResult(); } sleep(1); } ?>
It is forbidden to use any of the following in the documentation content: