@@ -119,7 +119,6 @@ The sbt-mdoc plugin supports the following settings.
119
119
120
120
```
121
121
122
-
123
122
## Command-line
124
123
125
124
Use [ coursier] ( https://github.com/coursier/coursier/#command-line ) to launch
@@ -135,6 +134,8 @@ info: Compiling 1 file to website/target/docs
135
134
info: Compiled in 1.2s (0 errors)
136
135
```
137
136
137
+ ### Add library dependencies to classpath
138
+
138
139
Add libraries to the launched classpath to include them for compilation.
139
140
140
141
``` diff
@@ -143,14 +144,28 @@ Add libraries to the launched classpath to include them for compilation.
143
144
+ org.typelevel:cats-core_@SCALA_BINARY_VERSION@:1.5.0
144
145
```
145
146
146
- Use ` --in ` to customize the input directory where markdown sources are
147
- 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,
148
151
149
152
``` diff
150
153
coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
151
154
+ --in mydocs
152
155
```
153
156
157
+ ### Process single markdown file
158
+
159
+ The ` --in ` flag doesn't have to be a directory, it also supports individual
160
+ files.
161
+
162
+ ``` diff
163
+ coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
164
+ + --in mydocs/readme.md
165
+ ```
166
+
167
+ ### Configure site variables like ` @@VERSION@ `
168
+
154
169
Use ` --site.VARIABLE=value ` to add site variables that can be referenced from
155
170
markdown as ` @@VARIABLE@ ` .
156
171
@@ -159,14 +174,44 @@ markdown as `@@VARIABLE@`.
159
174
+ --site.SCALA_VERSION @SCALA_VERSION@
160
175
```
161
176
162
- Use ` --out ` to customize the directory where markdown sources are generated, by
163
- default the ` out/ ` directory is used.
177
+ ### Customize output directory
178
+
179
+ Use ` --out ` to customize where your markdown sources are generated, by default
180
+ the ` out/ ` directory is used.
164
181
165
182
``` diff
166
183
coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
167
184
+ --out target/docs
168
185
```
169
186
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.
191
+
192
+ ``` diff
193
+ coursier launch org.scalameta:mdoc_@SCALA_BINARY_VERSION@:@VERSION@ -- \
194
+ + --in readme.template.md \
195
+ + --out readme.md
196
+ ```
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 changelog.template.md \
208
+ + --out changelog.md \
209
+ + --in mydocs-directory \
210
+ + --out out-directory \
211
+ ```
212
+
213
+ ### Live reload HTML preview on file save
214
+
170
215
Use ` --watch ` to start the file watcher with livereload. It's recommended to use
171
216
` --watch ` while writing documentation to enjoy 3-4x faster compilation
172
217
performance.
0 commit comments