Search and Top Navigation
TracLinks in reStructuredText
This document illustrates how to use the :trac:
role in reStructuredText. The page is written like:
{{{#!rst Examples: * Tickets: :trac:or :trac:
* Ticket comments: :trac:
* Reports: :trac:
or :trac:
* Changesets: :trac:
, :trac:
or :trac:
* Revision log: :trac:
, :trac:
or :trac:
, :trac:
* Diffs: :trac:
, :trac:
or :trac:
* Wiki pages: :trac:
or :trac:
* Milestones: :trac:
* Attachment: :trac:
* Files: :trac:
* A specific file revision: :trac:
* A particular line of a specific file revision: :trac:
An explicit label can be specified, separated from the link by a space: * See :trac:
and the :trac:
.
}}}
Provided you have docutils installed, the above block will render as:
Examples: * Tickets: :trac:or :trac:
* Ticket comments: :trac:
* Reports: :trac:
or :trac:
* Changesets: :trac:
, :trac:
or :trac:
* Revision log: :trac:
, :trac:
or :trac:
, :trac:
* Diffs: :trac:
, :trac:
or :trac:
* Wiki pages: :trac:
or :trac:
* Milestones: :trac:
* Attachment: :trac:
* Files: :trac:
* A specific file revision: :trac:
* A particular line of a specific file revision: :trac:
An explicit label can be specified, separated from the link by a space: * See :trac:
and the :trac:
.
Note that the above could have been written using substitution references and the #1
directive:
{{{#!rst See |ticket123|. .. |ticket123| trac:: ticket:123 this ticket
}}}
This renders as:
See |ticket123|. .. |ticket123| trac:: ticket:123 this ticket
See also: WikiRestructuredText, TracLinks