@@ -94,6 +94,7 @@ object GenerateReferenceDoc extends CaseApp[Options] {
94
94
b.append(
95
95
""" ---
96
96
|title: Command-line options
97
+ |sidebar_position: 1
97
98
|---
98
99
|
99
100
|""" .stripMargin
@@ -107,7 +108,7 @@ object GenerateReferenceDoc extends CaseApp[Options] {
107
108
// https://scala-cli.virtuslab.org/docs/reference/commands#install-completions
108
109
val names = c.names.map(_.mkString(" " ))
109
110
val text = names.map(" `" + _ + " `" ).mkString(" / " )
110
- s " [ $text](./commands# ${names.head.replace(" " , " -" )}) "
111
+ s " [ $text](./commands.md # ${names.head.replace(" " , " -" )}) "
111
112
}
112
113
val availableIn = " Available in commands:\n " + formattedCommands.map(" - " + _ + " \n " ).mkString
113
114
b.append(
@@ -154,6 +155,7 @@ object GenerateReferenceDoc extends CaseApp[Options] {
154
155
b.append(
155
156
""" ---
156
157
|title: Commands
158
+ |sidebar_position: 3
157
159
|---
158
160
|
159
161
|""" .stripMargin
@@ -195,7 +197,7 @@ object GenerateReferenceDoc extends CaseApp[Options] {
195
197
.split(" \\ s+" )
196
198
.map(_.toLowerCase(Locale .ROOT ).filter(_ != '.' ))
197
199
.mkString(" -" )
198
- s " [ $cleanedUp](/docs/reference/ cli-options# $linkPart-options) "
200
+ s " [ $cleanedUp](./ cli-options.md # $linkPart-options) "
199
201
}
200
202
b.append(
201
203
""" Accepts options:
@@ -229,6 +231,7 @@ object GenerateReferenceDoc extends CaseApp[Options] {
229
231
b.append(
230
232
""" ---
231
233
|title: Directives
234
+ |sidebar_position: 2
232
235
|---
233
236
|
234
237
|## using directives
@@ -291,8 +294,8 @@ object GenerateReferenceDoc extends CaseApp[Options] {
291
294
292
295
if (options.check) {
293
296
val content = Seq (
294
- (os.rel / " 01- cli-options.md" ) -> cliOptionsContent0,
295
- (os.rel / " 03- commands.md" ) -> commandsContent0
297
+ (os.rel / " cli-options.md" ) -> cliOptionsContent0,
298
+ (os.rel / " commands.md" ) -> commandsContent0
296
299
)
297
300
var anyDiff = false
298
301
for ((dest, content0) <- content) {
@@ -313,9 +316,9 @@ object GenerateReferenceDoc extends CaseApp[Options] {
313
316
sys.exit(1 )
314
317
}
315
318
else {
316
- maybeWrite(options.outputPath / " 01- cli-options.md" , cliOptionsContent0)
317
- maybeWrite(options.outputPath / " 03- commands.md" , commandsContent0)
318
- maybeWrite(options.outputPath / " 02- directives.md" , usingContent0)
319
+ maybeWrite(options.outputPath / " cli-options.md" , cliOptionsContent0)
320
+ maybeWrite(options.outputPath / " commands.md" , commandsContent0)
321
+ maybeWrite(options.outputPath / " directives.md" , usingContent0)
319
322
}
320
323
}
321
324
}
0 commit comments