@vkuttyp/docus 5.4.8 → 5.4.9
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/content.config.ts +13 -13
- package/nuxt.config.ts +1 -0
- package/package.json +7 -1
package/content.config.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { DefinedCollection } from '@nuxt/content'
|
|
2
|
-
import { defineContentConfig, defineCollection } from '@nuxt/content'
|
|
2
|
+
import { defineContentConfig, defineCollection, z } from '@nuxt/content'
|
|
3
3
|
import { useNuxt } from '@nuxt/kit'
|
|
4
4
|
import { joinURL } from 'ufo'
|
|
5
5
|
|
|
6
6
|
const { options } = useNuxt()
|
|
7
7
|
const cwd = joinURL(options.rootDir, 'content')
|
|
8
|
-
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
9
|
+
const locales = (options as any).i18n?.locales
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
// })
|
|
11
|
+
const createDocsSchema = () => z.object({
|
|
12
|
+
links: z.array(z.object({
|
|
13
|
+
label: z.string(),
|
|
14
|
+
icon: z.string(),
|
|
15
|
+
to: z.string(),
|
|
16
|
+
target: z.string().optional(),
|
|
17
|
+
})).optional(),
|
|
18
|
+
})
|
|
19
19
|
|
|
20
20
|
let collections: Record<string, DefinedCollection>
|
|
21
21
|
|
|
@@ -40,7 +40,7 @@ if (locales && Array.isArray(locales)) {
|
|
|
40
40
|
prefix: `/${code}`,
|
|
41
41
|
exclude: [`${code}/index.md`],
|
|
42
42
|
},
|
|
43
|
-
|
|
43
|
+
schema: createDocsSchema(),
|
|
44
44
|
})
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -60,7 +60,7 @@ else {
|
|
|
60
60
|
include: '**',
|
|
61
61
|
exclude: ['index.md'],
|
|
62
62
|
},
|
|
63
|
-
|
|
63
|
+
schema: createDocsSchema(),
|
|
64
64
|
}),
|
|
65
65
|
}
|
|
66
66
|
}
|
package/nuxt.config.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkuttyp/docus",
|
|
3
3
|
"description": "Nuxt layer for Docus documentation theme",
|
|
4
|
-
"version": "5.4.
|
|
4
|
+
"version": "5.4.9",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"repository": {
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
"utils",
|
|
22
22
|
"README.md"
|
|
23
23
|
],
|
|
24
|
+
"scripts": {
|
|
25
|
+
"postinstall": "patch-package"
|
|
26
|
+
},
|
|
24
27
|
"dependencies": {
|
|
25
28
|
"@iconify-json/lucide": "^1.2.81",
|
|
26
29
|
"@iconify-json/simple-icons": "^1.2.63",
|
|
@@ -51,5 +54,8 @@
|
|
|
51
54
|
"peerDependencies": {
|
|
52
55
|
"better-sqlite3": "12.x",
|
|
53
56
|
"nuxt": "4.x"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"patch-package": "^8.0.1"
|
|
54
60
|
}
|
|
55
61
|
}
|