39 | | == Configuration |
40 | | From the README of the latest version: |
41 | | {{{ |
42 | | Notes |
43 | | ===== |
44 | | |
45 | | This macro lets you include various things. |
46 | | |
47 | | Currently supported sources: |
48 | | |
49 | | * HTTP - ``http:`` and ``https:`` |
50 | | * FTP - ``ftp:`` |
51 | | * Wiki pages - ``wiki:`` |
52 | | * Repository files - ``source:`` |
53 | | * Ticket comments - ``ticket:N:comment:M`` (3.0dev, syntax may be changed before release) |
54 | | |
55 | | The default source is ``wiki`` if only a source path is given. |
56 | | |
57 | | An optional second argument sets the output MIME type, though in most |
58 | | cases the default will be correct. |
59 | | |
60 | | Permissions |
61 | | =========== |
62 | | |
63 | | The three remote sources (``http``, ``https``, and ``ftp``) require |
64 | | ``INCLUDE_URL`` to be rendered. |
65 | | |
66 | | Anyone can add a call to these, however they will not be shown. This is |
67 | | **not** a replacement for ``render_unsafe_content``, see below. |
68 | | |
69 | | Configuration |
70 | | ============= |
71 | | |
72 | | If ``[wiki] render_unsafe_content`` is off (the default), any produced |
73 | | HTML will be sanitized. |
74 | | |
75 | | .. caution:: |
76 | | This is a potential security risk! Please review the implications |
77 | | ``render_unsafe_content`` before using this feature. |
78 | | |
79 | | To enable the plugin:: |
80 | | |
81 | | [components] |
82 | | includemacro.* = enabled |
83 | | |
84 | | Example |
85 | | ======= |
86 | | |
87 | | Include another wiki page:: |
88 | | |
89 | | [[Include(PageName)]] |
90 | | |
91 | | Include a section of a page (the section heading must have an explicit id):: |
92 | | |
93 | | [[Include(PageName#section)]] |
94 | | |
95 | | Include the HEAD revision of a reStructuredText__ file from the repository:: |
96 | | |
97 | | [[Include(source:trunk/docs/README, text/x-rst)]] |
98 | | |
99 | | Include a specific revision of a file from the repository:: |
100 | | |
101 | | [[Include(source:trunk/docs/README@5, text/x-rst)]] |
102 | | |
103 | | Include only a subpart of file from the repository (use named arguments : start, end, lineno):: |
104 | | |
105 | | [[Include(source:trunk/docs/README@5, text/x-rst, start=5, end=15)]] |
106 | | [[Include(source:trunk/docs/README@5, text/x-rst, start=5, end=15, lineno=yes)]] |
107 | | |
108 | | It's possible to use regular expressions in start and/or end parameters |
109 | | |
110 | | [[Include(source:trunk/docs/README, start="[a-z]+", end=15, lineno=yes)]] |
111 | | [[Include(source:trunk/docs/README, start="[a-z]+", end="\[.+\]", lineno=yes)]] |
112 | | |
113 | | |
114 | | __ http://docutils.sf.net/rst.html |
115 | | |
116 | | .. tip:: |
117 | | If you set the ``svn:mime-type`` property on the file, you can |
118 | | leave off the explicit MIME type. |
119 | | }}} |
120 | | |