@alauda/doom 1.21.0 → 1.21.1
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/lib/cli/load-config.js +14 -16
- package/lib/theme/Layout.js +1 -1
- package/package.json +6 -6
package/lib/cli/load-config.js
CHANGED
|
@@ -330,22 +330,20 @@ export async function loadConfig(root, { config: configFile, base, prefix, v: ve
|
|
|
330
330
|
lang,
|
|
331
331
|
root,
|
|
332
332
|
});
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
})));
|
|
348
|
-
}
|
|
333
|
+
const hasLocales = !!commonConfig.themeConfig.locales?.length;
|
|
334
|
+
const apiEntries = await glob(`${hasLocales ? commonConfig.lang + '/' : ''}apis/{advanced_apis,crds,kubernetes_apis}/*/index.{md,mdx}`, { cwd: root });
|
|
335
|
+
const apiExports = apiEntries.map((entry) => {
|
|
336
|
+
const scope = entry.replace(/index\.mdx?$/, '');
|
|
337
|
+
return {
|
|
338
|
+
name: path.basename(path.dirname(entry)) + '_apis',
|
|
339
|
+
scope: hasLocales ? scope.replace(lang, '*') : scope,
|
|
340
|
+
};
|
|
341
|
+
});
|
|
342
|
+
mergedConfig.export = await Promise.all([...(config.export ?? []), ...apiExports].map(async (item) => ({
|
|
343
|
+
...item,
|
|
344
|
+
scope: Array.isArray(item.scope) ? item.scope : [item.scope],
|
|
345
|
+
flattenScope: (await glob(item.scope, { cwd: root })).filter(isDoc),
|
|
346
|
+
})));
|
|
349
347
|
if (base && prefix) {
|
|
350
348
|
mergedConfig.base = (mergedConfig.prefix = normalizeSlash(prefix)) + base;
|
|
351
349
|
}
|
package/lib/theme/Layout.js
CHANGED
|
@@ -24,7 +24,7 @@ const getClosestSidebar_ = (sidebarItems, pathname, exportItem, matched, depth =
|
|
|
24
24
|
if (depth === 0) {
|
|
25
25
|
matched = undefined;
|
|
26
26
|
}
|
|
27
|
-
if (exportItem.flattenScope
|
|
27
|
+
if (exportItem.flattenScope.includes(sidebar._fileKey)) {
|
|
28
28
|
matched = {
|
|
29
29
|
sidebar,
|
|
30
30
|
exportItem,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alauda/doom",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Doctor Doom making docs.",
|
|
6
6
|
"repository": {
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"@rsbuild/plugin-sass": "^1.5.0",
|
|
50
50
|
"@rsbuild/plugin-svgr": "^1.3.0",
|
|
51
51
|
"@rsbuild/plugin-yaml": "^1.0.4",
|
|
52
|
-
"@rspress/core": "2.0.
|
|
53
|
-
"@rspress/plugin-algolia": "2.0.
|
|
54
|
-
"@rspress/plugin-sitemap": "2.0.
|
|
55
|
-
"@rspress/shared": "2.0.
|
|
52
|
+
"@rspress/core": "2.0.5",
|
|
53
|
+
"@rspress/plugin-algolia": "2.0.5",
|
|
54
|
+
"@rspress/plugin-sitemap": "2.0.5",
|
|
55
|
+
"@rspress/shared": "2.0.5",
|
|
56
56
|
"@shikijs/transformers": "^4.0.1",
|
|
57
57
|
"@total-typescript/ts-reset": "^0.6.1",
|
|
58
58
|
"@types/react": "^19.2.14",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"chokidar": "^5.0.0",
|
|
61
61
|
"clsx": "^2.1.1",
|
|
62
62
|
"commander": "^14.0.3",
|
|
63
|
-
"ejs": "^
|
|
63
|
+
"ejs": "^5.0.0",
|
|
64
64
|
"es-toolkit": "^1.45.0",
|
|
65
65
|
"eslint": "^9.39.3",
|
|
66
66
|
"eslint-plugin-mdx": "^3.7.0",
|