@@ -12,20 +12,30 @@ Highlighted features:
12
12
13
13
The wiki toolkit plugin is available on the [ Gradle Plugin Portal] ( https://plugins.gradle.org/plugin/org.moddedmc.wiki.toolkit ) .
14
14
15
- You can install it in your project by adding the following code to your ` build.gradle ` .
15
+ You can install it in your project by adding the following code to your ` build.gradle ` or ` build.gradle.kts ` .
16
16
17
+ ` build.gradle `
17
18
``` groovy
18
19
plugins {
19
20
id 'org.moddedmc.wiki.toolkit' version '<version>'
20
21
}
21
22
```
22
23
24
+ ` build.gradle.kts `
25
+ ``` kts
26
+ plugins {
27
+ id(" org.moddedmc.wiki.toolkit" ) version " <version>"
28
+ }
29
+ ```
30
+
31
+
23
32
## Setup
24
33
25
34
The initial step for using this plugin is registering documentation roots, which is done via a Gradle DSL.
26
35
27
36
A minimal setup may look like this:
28
37
38
+ ` build.gradle `
29
39
``` groovy
30
40
wiki {
31
41
docs {
@@ -38,6 +48,17 @@ wiki {
38
48
}
39
49
```
40
50
51
+ ` build.gradle.kts `
52
+ ``` kts
53
+ wiki {
54
+ // The name of the object (examplemod) should match the registered wiki project ID (if it exists).
55
+ docs.create(" examplemod" ) {
56
+ // The path to the folder containing the documentation metadata file (sinytra-wiki.json)
57
+ root = file(" docs/examplemod" )
58
+ }
59
+ }
60
+ ```
61
+
41
62
## Real-time documentation preview
42
63
43
64
The plugin allows you to preview your mod documentation in real-time on your local machine. Behind the scenes,
@@ -89,7 +110,8 @@ There's no need to worry about it being present in all game runs, as it does not
89
110
nor does it affect the game. The exporter code only activates on designated run configurations.
90
111
91
112
``` groovy
92
- // Adding a repository is not necessary; it is automatically installed by the plugin
113
+ // Adding a repository is not necessary; it is automatically installed by the plugin.
114
+ // However, if you are using a multiloader setup like Architectury Loom, you will need to install the plugin on your subprojects as well.
93
115
dependencies {
94
116
// ModDevGradle
95
117
// Version list: https://maven.sinytra.org/org/sinytra/item-asset-export-neoforge
@@ -131,7 +153,7 @@ Once the token is generated, add it to your gradle configuration under the `wiki
131
153
132
154
``` groovy
133
155
wiki {
134
- wikiAccessToken = ' MY_ACCESS_TOKEN' // Starts with github_pat_
156
+ wikiAccessToken = " MY_ACCESS_TOKEN" // Starts with github_pat_
135
157
}
136
158
```
137
159
0 commit comments