@@ -1131,12 +1131,11 @@ import TabItem from '@theme/TabItem';
1131
1131
1132
1132
writeSourceLinks(recipeDescriptor, origin)
1133
1133
writeOptions(recipeDescriptor)
1134
- writeLicense(origin)
1135
1134
writeDefinition(recipeDescriptor, origin)
1135
+ writeExamples(recipeDescriptor)
1136
1136
writeUsage(recipeDescriptor, origin)
1137
1137
writeModerneLink(recipeDescriptor)
1138
1138
writeDataTables(recipeDescriptor)
1139
- writeExamples(recipeDescriptor)
1140
1139
writeContributors(recipeDescriptor)
1141
1140
}
1142
1141
}
@@ -1199,6 +1198,25 @@ import TabItem from '@theme/TabItem';
1199
1198
)
1200
1199
}
1201
1200
}
1201
+
1202
+ writeLicense(origin)
1203
+ }
1204
+
1205
+ private fun BufferedWriter.writeLicense (origin : RecipeOrigin ) {
1206
+ val licenseText = when (origin.license) {
1207
+ Licenses .Unknown -> " The license for this recipe is unknown."
1208
+ Licenses .Apache2 , Licenses .Proprietary , Licenses .MSAL -> " This recipe is available under the ${origin.license.markdown()} ."
1209
+ else -> " This recipe is available under the ${origin.license.markdown()} License, as defined by the recipe authors."
1210
+ }
1211
+
1212
+ // language=markdown
1213
+ writeln(
1214
+ """
1215
+
1216
+ $licenseText
1217
+
1218
+ """ .trimIndent()
1219
+ )
1202
1220
}
1203
1221
1204
1222
private fun BufferedWriter.writeOptions (recipeDescriptor : RecipeDescriptor ) {
@@ -1263,38 +1281,23 @@ import TabItem from '@theme/TabItem';
1263
1281
}
1264
1282
}
1265
1283
1266
- private fun BufferedWriter.writeLicense (origin : RecipeOrigin ) {
1267
- val licenseText = when (origin.license) {
1268
- Licenses .Unknown -> " The license for this recipe is unknown."
1269
- Licenses .Apache2 , Licenses .Proprietary , Licenses .MSAL -> " This recipe is available under the ${origin.license.markdown()} ."
1270
- else -> " This recipe is available under the ${origin.license.markdown()} License, as defined by the recipe authors."
1271
- }
1272
-
1273
- // language=markdown
1274
- writeln(
1275
- """
1276
- ## License
1277
-
1278
- $licenseText
1279
-
1280
- """ .trimIndent()
1281
- )
1282
- }
1283
-
1284
1284
private fun BufferedWriter.writeDataTables (recipeDescriptor : RecipeDescriptor ) {
1285
1285
if (recipeDescriptor.dataTables.isNotEmpty()) {
1286
1286
writeln(
1287
1287
// language=markdown
1288
1288
"""
1289
1289
## Data Tables
1290
1290
1291
+ <Tabs groupId="data-tables">
1291
1292
""" .trimIndent()
1292
1293
)
1293
1294
1294
1295
for (dataTable in recipeDescriptor.dataTables) {
1295
1296
// language=markdown
1296
1297
writeln(
1297
1298
"""
1299
+ <TabItem value="${dataTable.name} " label="${dataTable.name.substringAfterLast(' .' )} ">
1300
+
1298
1301
### ${dataTable.displayName}
1299
1302
**${dataTable.name} **
1300
1303
@@ -1314,8 +1317,22 @@ import TabItem from '@theme/TabItem';
1314
1317
)
1315
1318
}
1316
1319
1320
+ writeln(
1321
+ """
1322
+
1323
+ </TabItem>
1324
+ """ .trimIndent()
1325
+ )
1326
+
1317
1327
newLine()
1318
1328
}
1329
+
1330
+ writeln(
1331
+ // language=markdown
1332
+ """
1333
+ </Tabs>
1334
+ """ .trimIndent()
1335
+ )
1319
1336
}
1320
1337
}
1321
1338
0 commit comments