@mintlify/previewing 4.0.1040 → 4.0.1041

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { getAllPathsInDocsNav } from '@mintlify/common';
2
+ import { getAllPathsInDecoratedNav, getAllPathsInDocsNav } from '@mintlify/common';
3
3
  import { prebuild } from '@mintlify/prebuild';
4
4
  import AdmZip from 'adm-zip';
5
5
  import express from 'express';
@@ -50,6 +50,15 @@ async function collectRoutes() {
50
50
  routes.add(`/${navPath}`);
51
51
  }
52
52
  }
53
+ // Also collect routes from the generated decorated nav, which includes OpenAPI/AsyncAPI
54
+ // pages and filters to real page entries (ignoring non-page hrefs in nav divisions).
55
+ const generatedNavPath = path.join(NEXT_PROPS_PATH, 'generatedDocsNav.json');
56
+ if (await pathExists(generatedNavPath)) {
57
+ const generatedNav = await fse.readJson(generatedNavPath);
58
+ for (const navPath of getAllPathsInDecoratedNav(generatedNav)) {
59
+ routes.add(`/${navPath}`);
60
+ }
61
+ }
53
62
  return [...routes];
54
63
  }
55
64
  async function generatePages(baseUrl, routes, outputDir) {