Changes between Initial Version and Version 1 of WikiRestructuredTextLinks


Ignore:
Timestamp:
12/12/22 22:01:51 (2 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiRestructuredTextLinks

    v1 v1  
     1= TracLinks in reStructuredText =
     2
     3This document illustrates how to use the `:trac:` role in [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html reStructuredText]. The page is written like:
     4
     5{{{
     6{{{#!rst
     7Examples:
     8
     9 * Tickets: :trac:`#1` or :trac:`ticket:1`
     10 * Ticket comments: :trac:`comment:ticket:1:2`
     11 * Reports: :trac:`{1}` or :trac:`report:1`
     12 * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`
     13 * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`
     14 * Diffs: :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`
     15 * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`
     16 * Milestones: :trac:`milestone:1.0`
     17 * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`
     18 * Files: :trac:`source:trunk/COPYING`
     19 * A specific file revision: :trac:`source:/trunk/COPYING@200`
     20 * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`
     21
     22An explicit label can be specified, separated from the link by a space:
     23
     24 * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.
     25}}}
     26}}}
     27
     28Provided you have [http://docutils.sourceforge.net/ docutils] installed, the above block will render as:
     29----
     30{{{#!rst
     31Examples:
     32
     33 * Tickets: :trac:`#1` or :trac:`ticket:1`
     34 * Ticket comments: :trac:`comment:ticket:1:2`
     35 * Reports: :trac:`{1}` or :trac:`report:1`
     36 * Changesets: :trac:`r1`, :trac:`[1]` or :trac:`changeset:1`
     37 * Revision log: :trac:`r1:3`, :trac:`[1:3]` or :trac:`log:@1:3`, :trac:`log:trunk@1:3`
     38 * Diffs: :trac:`diff:@20:30`, :trac:`diff:tags/trac-0.9.2/wiki-default//tags/trac-0.9.3/wiki-default` or :trac:`diff:trunk/trac@3538//sandbox/vc-refactoring/trac@3539`
     39 * Wiki pages: :trac:`CamelCase` or :trac:`wiki:CamelCase`
     40 * Milestones: :trac:`milestone:1.0`
     41 * Attachment: :trac:`attachment:ticket:944:attachment.1073.diff`
     42 * Files: :trac:`source:trunk/COPYING`
     43 * A specific file revision: :trac:`source:/trunk/COPYING@200`
     44 * A particular line of a specific file revision: :trac:`source:/trunk/COPYING@200#L25`
     45
     46An explicit label can be specified, separated from the link by a space:
     47
     48 * See :trac:`#1 ticket 1` and the :trac:`source:trunk/COPYING license`.
     49}}}
     50----
     51
     52Note that the above could have been written using substitution references and the `trac::` directive:
     53{{{
     54{{{#!rst
     55See |ticket123|.
     56
     57 .. |ticket123| trac:: ticket:123 this ticket
     58}}}
     59}}}
     60
     61This renders as:
     62----
     63
     64{{{#!rst
     65See |ticket123|.
     66
     67 .. |ticket123| trac:: ticket:123 this ticket
     68}}}
     69
     70----
     71See also: WikiRestructuredText, TracLinks
Trac Appliance - Powered by TurnKey Linux