For consistent wiki formatting, please adhere to the following style guidelines.
* Page Naming
* Headings
* Links
* Instructions containing shell commands
{{{#!shell{{{#!shell-sessionuser@console:path$root@node-name:path$Pages that are introductory to larger sections that contain many sub-pages (e.g. the Tutorials page) should use the following as a starting point:
[[Include(WikiToC)]]
= Section Title
Brief description of the section...
The TOC macro will auto-generate an alphabetical inline list of links to sub-pages of the section. If the sub-pages need to have a specific order, feel free to edit the TOC macro or create the list by hand, but try to keep the style as similar as possible.
Individual wiki pages should use the following as a starting point:
[[Include(WikiToC)]]
== Page Title
Brief description of the page...
=== Sub Section Title
Sub section content...
Note:
type=note
For pages nested deeper, please increase the number of equal signs in the headings to account for the page depth accordingly (though max heading depth is 6). Otherwise, the auto-generated table of contents on parent pages may not generate correctly.
Please us the following document skeleton when writing a tutorial.
{{{
[[Include(WikiToC)]]
== Tutorial Title
=== Description
Description and goal of the tutorial described here...
=== Prerequisites
List prerequisites here...
=== Resource Requirements
List of specific resources or requirements, including OMF image name if applicable.
=== Setup
Steps to setup the tutorial...
=== Execution
==== The first thing you do
First step of the tutorial...
==== The second thing you do
Second step of the tutorial...
}}}
When including raw source code blocks, try to use the appropriate syntax highlighting for the language used. Trac uses pygments to do syntax highlighting in code blocks.
{{{#!shell
echo "foo"
}}}
will be rendered as
echo "foo"
{{{#!ruby
defTopology('rxnode') { |t|
# Load the topology of imaged nodes
# These nodes are from most recent omf load command
baseTopo = Topology['system:topo:imaged']
# Draw a random node from the pool of active ones
aNode = baseTopo.getUniqueRandomNode
# Add this random node to this 'senderTopo' topology
t.addNode(aNode)
puts "RX: #{t.getNodeByIndex(0).to_s}"
}
}}}
will be rendered as
defTopology('rxnode') { |t|
# Load the topology of imaged nodes
# These nodes are from most recent omf load command
baseTopo = Topology['system:topo:imaged']
# Draw a random node from the pool of active ones
aNode = baseTopo.getUniqueRandomNode
# Add this random node to this 'senderTopo' topology
t.addNode(aNode)
puts "RX: #{t.getNodeByIndex(0).to_s}"
}
| =Language = | =Shortname to Use in Code Block = |
|---|---|
| C code | c |
| C++ code | cpp |
|| Python code || python
| Java | java |
|---|---|
| JavaScript | js |
| Ruby code | ruby |
| Ruby session | irb |
| JSON | json |
| JSON with no braces | json-object |
|| XML || xml
| YAML | yaml |
|---|---|
| Docker | docker, dockerfile |
| shell script | bash, sh, shell |
| shell session | console, shell-session |
| powershell | powershell |
To use Markdown instead of Tracs' own language, simply enclose the Markdown text in a code block starting with `#Markdown` like this:
{{{#!Markdown
# Some Title
Sample text.
## A Sub Section
More sample text.
### Yet another sub section
Even more sample text.
}}}
or if you want to use RestructuredText instead, start the code block with `#rst` like this:
{{{#!rst
**********
Some Title
**********
Sample text.
A Sub Section
#############
More sample text.
Yet another sub section
***********************
Even more sample text.
}}}