@mintlify/prebuild 1.0.777 → 1.0.779

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/generate.js CHANGED
@@ -1,4 +1,4 @@
1
- import { slugToTitle, optionallyAddLeadingSlash } from '@mintlify/common';
1
+ import { slugToTitle, optionallyAddLeadingSlash, removeLeadingSlash, optionallyRemoveTrailingSlash, } from '@mintlify/common';
2
2
  import { divisions, } from '@mintlify/validation';
3
3
  import chalk from 'chalk';
4
4
  const handleUnknownPage = (page, type) => {
@@ -14,7 +14,8 @@ export const generateDecoratedMintNavigationFromPages = (filenamePageMetadataMap
14
14
  ...nav,
15
15
  pages: nav.pages.map((page) => {
16
16
  if (typeof page === 'string') {
17
- const pageMetadata = filenamePageMetadataMap[page];
17
+ const cleanedPage = optionallyRemoveTrailingSlash(removeLeadingSlash(page));
18
+ const pageMetadata = filenamePageMetadataMap[cleanedPage] ?? filenamePageMetadataMap[page];
18
19
  if (pageMetadata) {
19
20
  return pageMetadata;
20
21
  }
@@ -31,7 +32,8 @@ export const generateDecoratedMintNavigationFromPages = (filenamePageMetadataMap
31
32
  export const generateDecoratedDocsNavigationFromPages = (filenamePageMetadataMap, docsConfigNav) => {
32
33
  const { global, ...nav } = docsConfigNav;
33
34
  const generateDecoratedPages = (page) => {
34
- const pageMetadata = filenamePageMetadataMap[page];
35
+ const cleanedPage = optionallyRemoveTrailingSlash(removeLeadingSlash(page));
36
+ const pageMetadata = filenamePageMetadataMap[cleanedPage] ?? filenamePageMetadataMap[page];
35
37
  if (pageMetadata) {
36
38
  return pageMetadata;
37
39
  }
@@ -246,10 +246,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
246
246
  indexing?: "all" | "navigable" | undefined;
247
247
  } | undefined;
248
248
  description?: string | undefined;
249
- banner?: {
250
- content: string;
251
- dismissible?: boolean | undefined;
252
- } | undefined;
253
249
  appearance?: {
254
250
  strict?: boolean | undefined;
255
251
  default?: "light" | "dark" | "system" | undefined;
@@ -308,6 +304,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
308
304
  } | undefined;
309
305
  latex?: boolean | undefined;
310
306
  } | undefined;
307
+ banner?: {
308
+ content: string;
309
+ dismissible?: boolean | undefined;
310
+ } | undefined;
311
311
  errors?: {
312
312
  "404": {
313
313
  redirect: boolean;
@@ -569,10 +569,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
569
569
  indexing?: "all" | "navigable" | undefined;
570
570
  } | undefined;
571
571
  description?: string | undefined;
572
- banner?: {
573
- content: string;
574
- dismissible?: boolean | undefined;
575
- } | undefined;
576
572
  appearance?: {
577
573
  strict?: boolean | undefined;
578
574
  default?: "light" | "dark" | "system" | undefined;
@@ -631,6 +627,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
631
627
  } | undefined;
632
628
  latex?: boolean | undefined;
633
629
  } | undefined;
630
+ banner?: {
631
+ content: string;
632
+ dismissible?: boolean | undefined;
633
+ } | undefined;
634
634
  errors?: {
635
635
  "404": {
636
636
  redirect: boolean;
@@ -892,10 +892,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
892
892
  indexing?: "all" | "navigable" | undefined;
893
893
  } | undefined;
894
894
  description?: string | undefined;
895
- banner?: {
896
- content: string;
897
- dismissible?: boolean | undefined;
898
- } | undefined;
899
895
  appearance?: {
900
896
  strict?: boolean | undefined;
901
897
  default?: "light" | "dark" | "system" | undefined;
@@ -954,6 +950,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
954
950
  } | undefined;
955
951
  latex?: boolean | undefined;
956
952
  } | undefined;
953
+ banner?: {
954
+ content: string;
955
+ dismissible?: boolean | undefined;
956
+ } | undefined;
957
957
  errors?: {
958
958
  "404": {
959
959
  redirect: boolean;
@@ -1215,10 +1215,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1215
1215
  indexing?: "all" | "navigable" | undefined;
1216
1216
  } | undefined;
1217
1217
  description?: string | undefined;
1218
- banner?: {
1219
- content: string;
1220
- dismissible?: boolean | undefined;
1221
- } | undefined;
1222
1218
  appearance?: {
1223
1219
  strict?: boolean | undefined;
1224
1220
  default?: "light" | "dark" | "system" | undefined;
@@ -1277,6 +1273,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1277
1273
  } | undefined;
1278
1274
  latex?: boolean | undefined;
1279
1275
  } | undefined;
1276
+ banner?: {
1277
+ content: string;
1278
+ dismissible?: boolean | undefined;
1279
+ } | undefined;
1280
1280
  errors?: {
1281
1281
  "404": {
1282
1282
  redirect: boolean;
@@ -1538,10 +1538,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1538
1538
  indexing?: "all" | "navigable" | undefined;
1539
1539
  } | undefined;
1540
1540
  description?: string | undefined;
1541
- banner?: {
1542
- content: string;
1543
- dismissible?: boolean | undefined;
1544
- } | undefined;
1545
1541
  appearance?: {
1546
1542
  strict?: boolean | undefined;
1547
1543
  default?: "light" | "dark" | "system" | undefined;
@@ -1600,6 +1596,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1600
1596
  } | undefined;
1601
1597
  latex?: boolean | undefined;
1602
1598
  } | undefined;
1599
+ banner?: {
1600
+ content: string;
1601
+ dismissible?: boolean | undefined;
1602
+ } | undefined;
1603
1603
  errors?: {
1604
1604
  "404": {
1605
1605
  redirect: boolean;
@@ -1861,10 +1861,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1861
1861
  indexing?: "all" | "navigable" | undefined;
1862
1862
  } | undefined;
1863
1863
  description?: string | undefined;
1864
- banner?: {
1865
- content: string;
1866
- dismissible?: boolean | undefined;
1867
- } | undefined;
1868
1864
  appearance?: {
1869
1865
  strict?: boolean | undefined;
1870
1866
  default?: "light" | "dark" | "system" | undefined;
@@ -1923,6 +1919,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
1923
1919
  } | undefined;
1924
1920
  latex?: boolean | undefined;
1925
1921
  } | undefined;
1922
+ banner?: {
1923
+ content: string;
1924
+ dismissible?: boolean | undefined;
1925
+ } | undefined;
1926
1926
  errors?: {
1927
1927
  "404": {
1928
1928
  redirect: boolean;
@@ -2184,10 +2184,6 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
2184
2184
  indexing?: "all" | "navigable" | undefined;
2185
2185
  } | undefined;
2186
2186
  description?: string | undefined;
2187
- banner?: {
2188
- content: string;
2189
- dismissible?: boolean | undefined;
2190
- } | undefined;
2191
2187
  appearance?: {
2192
2188
  strict?: boolean | undefined;
2193
2189
  default?: "light" | "dark" | "system" | undefined;
@@ -2246,6 +2242,10 @@ export declare const DocsConfigUpdater: ConfigUpdater<{
2246
2242
  } | undefined;
2247
2243
  latex?: boolean | undefined;
2248
2244
  } | undefined;
2245
+ banner?: {
2246
+ content: string;
2247
+ dismissible?: boolean | undefined;
2248
+ } | undefined;
2249
2249
  errors?: {
2250
2250
  "404": {
2251
2251
  redirect: boolean;
@@ -241,10 +241,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
241
241
  indexing?: "all" | "navigable" | undefined;
242
242
  } | undefined;
243
243
  description?: string | undefined;
244
- banner?: {
245
- content: string;
246
- dismissible?: boolean | undefined;
247
- } | undefined;
248
244
  appearance?: {
249
245
  strict?: boolean | undefined;
250
246
  default?: "light" | "dark" | "system" | undefined;
@@ -303,6 +299,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
303
299
  } | undefined;
304
300
  latex?: boolean | undefined;
305
301
  } | undefined;
302
+ banner?: {
303
+ content: string;
304
+ dismissible?: boolean | undefined;
305
+ } | undefined;
306
306
  errors?: {
307
307
  "404": {
308
308
  redirect: boolean;
@@ -564,10 +564,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
564
564
  indexing?: "all" | "navigable" | undefined;
565
565
  } | undefined;
566
566
  description?: string | undefined;
567
- banner?: {
568
- content: string;
569
- dismissible?: boolean | undefined;
570
- } | undefined;
571
567
  appearance?: {
572
568
  strict?: boolean | undefined;
573
569
  default?: "light" | "dark" | "system" | undefined;
@@ -626,6 +622,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
626
622
  } | undefined;
627
623
  latex?: boolean | undefined;
628
624
  } | undefined;
625
+ banner?: {
626
+ content: string;
627
+ dismissible?: boolean | undefined;
628
+ } | undefined;
629
629
  errors?: {
630
630
  "404": {
631
631
  redirect: boolean;
@@ -887,10 +887,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
887
887
  indexing?: "all" | "navigable" | undefined;
888
888
  } | undefined;
889
889
  description?: string | undefined;
890
- banner?: {
891
- content: string;
892
- dismissible?: boolean | undefined;
893
- } | undefined;
894
890
  appearance?: {
895
891
  strict?: boolean | undefined;
896
892
  default?: "light" | "dark" | "system" | undefined;
@@ -949,6 +945,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
949
945
  } | undefined;
950
946
  latex?: boolean | undefined;
951
947
  } | undefined;
948
+ banner?: {
949
+ content: string;
950
+ dismissible?: boolean | undefined;
951
+ } | undefined;
952
952
  errors?: {
953
953
  "404": {
954
954
  redirect: boolean;
@@ -1210,10 +1210,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
1210
1210
  indexing?: "all" | "navigable" | undefined;
1211
1211
  } | undefined;
1212
1212
  description?: string | undefined;
1213
- banner?: {
1214
- content: string;
1215
- dismissible?: boolean | undefined;
1216
- } | undefined;
1217
1213
  appearance?: {
1218
1214
  strict?: boolean | undefined;
1219
1215
  default?: "light" | "dark" | "system" | undefined;
@@ -1272,6 +1268,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
1272
1268
  } | undefined;
1273
1269
  latex?: boolean | undefined;
1274
1270
  } | undefined;
1271
+ banner?: {
1272
+ content: string;
1273
+ dismissible?: boolean | undefined;
1274
+ } | undefined;
1275
1275
  errors?: {
1276
1276
  "404": {
1277
1277
  redirect: boolean;
@@ -1533,10 +1533,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
1533
1533
  indexing?: "all" | "navigable" | undefined;
1534
1534
  } | undefined;
1535
1535
  description?: string | undefined;
1536
- banner?: {
1537
- content: string;
1538
- dismissible?: boolean | undefined;
1539
- } | undefined;
1540
1536
  appearance?: {
1541
1537
  strict?: boolean | undefined;
1542
1538
  default?: "light" | "dark" | "system" | undefined;
@@ -1595,6 +1591,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
1595
1591
  } | undefined;
1596
1592
  latex?: boolean | undefined;
1597
1593
  } | undefined;
1594
+ banner?: {
1595
+ content: string;
1596
+ dismissible?: boolean | undefined;
1597
+ } | undefined;
1598
1598
  errors?: {
1599
1599
  "404": {
1600
1600
  redirect: boolean;
@@ -1856,10 +1856,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
1856
1856
  indexing?: "all" | "navigable" | undefined;
1857
1857
  } | undefined;
1858
1858
  description?: string | undefined;
1859
- banner?: {
1860
- content: string;
1861
- dismissible?: boolean | undefined;
1862
- } | undefined;
1863
1859
  appearance?: {
1864
1860
  strict?: boolean | undefined;
1865
1861
  default?: "light" | "dark" | "system" | undefined;
@@ -1918,6 +1914,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
1918
1914
  } | undefined;
1919
1915
  latex?: boolean | undefined;
1920
1916
  } | undefined;
1917
+ banner?: {
1918
+ content: string;
1919
+ dismissible?: boolean | undefined;
1920
+ } | undefined;
1921
1921
  errors?: {
1922
1922
  "404": {
1923
1923
  redirect: boolean;
@@ -2179,10 +2179,6 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
2179
2179
  indexing?: "all" | "navigable" | undefined;
2180
2180
  } | undefined;
2181
2181
  description?: string | undefined;
2182
- banner?: {
2183
- content: string;
2184
- dismissible?: boolean | undefined;
2185
- } | undefined;
2186
2182
  appearance?: {
2187
2183
  strict?: boolean | undefined;
2188
2184
  default?: "light" | "dark" | "system" | undefined;
@@ -2241,6 +2237,10 @@ export declare const update: ({ contentDirectoryPath, staticFilenames, openApiFi
2241
2237
  } | undefined;
2242
2238
  latex?: boolean | undefined;
2243
2239
  } | undefined;
2240
+ banner?: {
2241
+ content: string;
2242
+ dismissible?: boolean | undefined;
2243
+ } | undefined;
2244
2244
  errors?: {
2245
2245
  "404": {
2246
2246
  redirect: boolean;