@@ -134,6 +134,8 @@ info: Compiling 1 file to website/target/docs
134
134
info: Compiled in 1.2s (0 errors)
135
135
```
136
136
137
+ ### Add library dependencies to classpath
138
+
137
139
Add libraries to the launched classpath to include them for compilation.
138
140
139
141
``` diff
@@ -142,14 +144,18 @@ Add libraries to the launched classpath to include them for compilation.
142
144
+ org.typelevel:cats-core_@SCALA_BINARY_VERSION@:1.5.0
143
145
```
144
146
145
- Use ` --in ` to customize the input directory where markdown sources are
146
- contained, by default the ` docs/ ` directory is used.
147
+ ### Customize input directory
148
+
149
+ By default the ` docs/ ` directory is processed as input. Use ` --in ` to customize
150
+ the input directory where markdown sources are contained,
147
151
148
152
``` diff
149
153
coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
150
154
+ --in mydocs
151
155
```
152
156
157
+ ### Process single markdown file
158
+
153
159
The ` --in ` flag doesn't have to be a directory, it also supports individual
154
160
files.
155
161
@@ -158,6 +164,8 @@ files.
158
164
+ --in mydocs/readme.md
159
165
```
160
166
167
+ ### Configure site variables like ` @VERSION@ `
168
+
161
169
Use ` --site.VARIABLE=value ` to add site variables that can be referenced from
162
170
markdown as ` @@VARIABLE@ ` .
163
171
@@ -166,6 +174,8 @@ markdown as `@@VARIABLE@`.
166
174
+ --site.SCALA_VERSION @SCALA_VERSION@
167
175
```
168
176
177
+ ### Customize output directory
178
+
169
179
Use ` --out ` to customize where your markdown sources are generated, by default
170
180
the ` out/ ` directory is used.
171
181
@@ -174,15 +184,34 @@ the `out/` directory is used.
174
184
+ --out target/docs
175
185
```
176
186
177
- The ` --out ` flag doesn't have to be a directory, it can also be an individual
178
- file. However, this assumes that your ` --in ` was also an individual file.
187
+ ### Generate single output file instead of directory
188
+
189
+ The ` --out ` flag doesn't have to be a directory when the ` --in ` argument is a
190
+ regular file, it can also be an individual file.
179
191
180
192
``` diff
181
193
coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
182
- + --in mydocs/ readme.template.md \
194
+ + --in readme.template.md \
183
195
+ --out readme.md
184
196
```
185
197
198
+ ### Process multiple input directories and files
199
+
200
+ Repeat the ` --in ` and ` --out ` arguments to process multiple directories and
201
+ regular files.
202
+
203
+ ``` diff
204
+ coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
205
+ + --in readme.template.md \
206
+ + --out readme.md \
207
+ + --in example.template.md \
208
+ + --out example.md \
209
+ + --in mydocs-directory \
210
+ + --out out-directory \
211
+ ```
212
+
213
+ ### Live reload HTML preview on file save
214
+
186
215
Use ` --watch ` to start the file watcher with livereload. It's recommended to use
187
216
` --watch ` while writing documentation to enjoy 3-4x faster compilation
188
217
performance.
0 commit comments