Wiki source code of SCM Macro
Last modified by Vincent Massol on 2024/04/09
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | Macro to use when referencing code in a scm. | ||
2 | |||
3 | Examples: | ||
4 | |||
5 | {{code}} | ||
6 | {{scm/}} | ||
7 | |||
8 | {{scm project="xwiki-rendering"/}} | ||
9 | |||
10 | {{scm project="xwiki-commons" path="xwiki-commons-core/pom.xml"/}} | ||
11 | |||
12 | {{scm branch="stable-3.1.x" path="xwiki-platform-core/pom.xml"/}} | ||
13 | |||
14 | {{scm path="xwiki-platform-core/pom.xml"/}} | ||
15 | |||
16 | {{scm branch="stable-3.1.x" path="xwiki-platform-core/pom.xml"}}With **label**{{/scm}} | ||
17 | |||
18 | {{scm branch="stable-3.1.x" path="xwiki-platform-core/pom.xml" raw="true"/}} | ||
19 | {{/code}} | ||
20 | |||
21 | Results: | ||
22 | |||
23 | {{scm/}} | ||
24 | |||
25 | {{scm project="xwiki-rendering"/}} | ||
26 | |||
27 | {{scm project="xwiki-commons" path="xwiki-commons-core/pom.xml"/}} | ||
28 | |||
29 | {{scm branch="stable-3.1.x" path="xwiki-platform-core/pom.xml"/}} | ||
30 | |||
31 | {{scm path="xwiki-platform-core/pom.xml"/}} | ||
32 | |||
33 | {{scm branch="stable-3.1.x" path="xwiki-platform-core/pom.xml"}}With **label**{{/scm}} | ||
34 | |||
35 | {{scm branch="stable-3.1.x" path="xwiki-platform-core/pom.xml" raw="true"/}} | ||
36 | |||
37 | = Parameters | ||
38 | |||
39 | |= Parameter name |= Default value |= Description | ||
40 | | user | xwiki | the github user | ||
41 | | project | xwiki-platform | the repository name in the provided user | ||
42 | | branch | master | the branch or tag | ||
43 | | raw | false | UI or raw content | ||
44 | | path | empty string | the resource in the repository |