barodoc 9.0.0 → 10.0.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/dist/cli.js +16 -5
- package/package.json +12 -12
package/dist/cli.js
CHANGED
|
@@ -13,7 +13,7 @@ import cac from "cac";
|
|
|
13
13
|
import pc10 from "picocolors";
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
|
-
var version = "
|
|
16
|
+
var version = "10.0.1";
|
|
17
17
|
|
|
18
18
|
// src/commands/serve.ts
|
|
19
19
|
import path from "path";
|
|
@@ -926,9 +926,12 @@ function getNavSlugs(config) {
|
|
|
926
926
|
result.set(locale, /* @__PURE__ */ new Set());
|
|
927
927
|
}
|
|
928
928
|
for (const group of config.navigation ?? []) {
|
|
929
|
-
for (const
|
|
930
|
-
|
|
931
|
-
|
|
929
|
+
for (const entry of group.pages ?? []) {
|
|
930
|
+
const slugs = typeof entry === "string" ? [entry] : entry.pages;
|
|
931
|
+
for (const page of slugs) {
|
|
932
|
+
for (const locale of locales) {
|
|
933
|
+
result.get(locale).add(page);
|
|
934
|
+
}
|
|
932
935
|
}
|
|
933
936
|
}
|
|
934
937
|
}
|
|
@@ -1289,9 +1292,17 @@ function countWords(content) {
|
|
|
1289
1292
|
const stripped = content.replace(/```[\s\S]*?```/g, "").replace(/<[^>]+>/g, "").replace(/^---[\s\S]*?---/m, "").replace(/[#*_~`\[\]()>|]/g, "");
|
|
1290
1293
|
return stripped.split(/\s+/).filter((w) => w.length > 0).length;
|
|
1291
1294
|
}
|
|
1295
|
+
function flatPages(pages) {
|
|
1296
|
+
const out = [];
|
|
1297
|
+
for (const entry of pages) {
|
|
1298
|
+
if (typeof entry === "string") out.push(entry);
|
|
1299
|
+
else out.push(...entry.pages);
|
|
1300
|
+
}
|
|
1301
|
+
return out;
|
|
1302
|
+
}
|
|
1292
1303
|
function findCategory(slug, navigation) {
|
|
1293
1304
|
for (const group of navigation) {
|
|
1294
|
-
if (group.pages.includes(slug)) return group.group;
|
|
1305
|
+
if (flatPages(group.pages).includes(slug)) return group.group;
|
|
1295
1306
|
}
|
|
1296
1307
|
return null;
|
|
1297
1308
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "barodoc",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.1",
|
|
4
4
|
"description": "Documentation framework powered by Astro",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"tailwindcss": "^4.0.0",
|
|
36
36
|
"zod": "^3.24.0",
|
|
37
37
|
"zod-to-json-schema": "^3.25.1",
|
|
38
|
-
"@barodoc/core": "
|
|
39
|
-
"@barodoc/plugin-analytics": "
|
|
40
|
-
"@barodoc/plugin-docsearch": "
|
|
41
|
-
"@barodoc/plugin-llms-txt": "
|
|
42
|
-
"@barodoc/plugin-og-image": "
|
|
43
|
-
"@barodoc/plugin-openapi": "
|
|
44
|
-
"@barodoc/plugin-pwa": "
|
|
45
|
-
"@barodoc/plugin-rss": "
|
|
46
|
-
"@barodoc/plugin-search": "
|
|
47
|
-
"@barodoc/
|
|
48
|
-
"@barodoc/
|
|
38
|
+
"@barodoc/core": "10.0.0",
|
|
39
|
+
"@barodoc/plugin-analytics": "10.0.0",
|
|
40
|
+
"@barodoc/plugin-docsearch": "10.0.0",
|
|
41
|
+
"@barodoc/plugin-llms-txt": "10.0.0",
|
|
42
|
+
"@barodoc/plugin-og-image": "9.0.0",
|
|
43
|
+
"@barodoc/plugin-openapi": "10.0.0",
|
|
44
|
+
"@barodoc/plugin-pwa": "10.0.0",
|
|
45
|
+
"@barodoc/plugin-rss": "10.0.0",
|
|
46
|
+
"@barodoc/plugin-search": "10.0.0",
|
|
47
|
+
"@barodoc/theme-docs": "10.0.1",
|
|
48
|
+
"@barodoc/plugin-sitemap": "10.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/fs-extra": "^11.0.4",
|