@levino/shipyard-docs 0.7.5 → 0.7.6-rc-20260316212851
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/astro/DocsEntry.astro +4 -4
- package/package.json +6 -6
- package/src/index.ts +1 -1
- package/src/schema.test.ts +4 -1
package/astro/DocsEntry.astro
CHANGED
|
@@ -8,7 +8,7 @@ import Layout from './Layout.astro'
|
|
|
8
8
|
export async function getStaticPaths() {
|
|
9
9
|
// Get all configured docs collections
|
|
10
10
|
const allPaths = await Promise.all(
|
|
11
|
-
Object.entries(docsConfigs).map(async ([
|
|
11
|
+
Object.entries(docsConfigs).map(async ([basePath, config]) => {
|
|
12
12
|
const docs = await getCollection(config.collectionName as CollectionKey)
|
|
13
13
|
|
|
14
14
|
const getParams = (slug: string) => {
|
|
@@ -26,9 +26,9 @@ export async function getStaticPaths() {
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
return docs.map((
|
|
30
|
-
params: getParams(
|
|
31
|
-
props: { entry, routeBasePath },
|
|
29
|
+
return docs.map((doc) => ({
|
|
30
|
+
params: getParams(doc.id),
|
|
31
|
+
props: { entry: doc, routeBasePath: basePath },
|
|
32
32
|
}))
|
|
33
33
|
}),
|
|
34
34
|
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levino/shipyard-docs",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6-rc-20260316212851",
|
|
4
4
|
"description": "Documentation plugin for shipyard with automatic sidebar, pagination, and git metadata",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -21,20 +21,20 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"homepage": "https://shipyard.levinkeller.de",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"astro": "^
|
|
24
|
+
"astro": "^6.0.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"effect": "^3.
|
|
27
|
+
"effect": "^3.19.0",
|
|
28
28
|
"ramda": "^0.31",
|
|
29
29
|
"unist-util-visit": "^5.0.0",
|
|
30
|
-
"@levino/shipyard-base": "
|
|
30
|
+
"@levino/shipyard-base": "0.7.6-rc-20260316212851"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@tailwindcss/typography": "^0.5.16",
|
|
34
34
|
"@types/hast": "^3.0.4",
|
|
35
35
|
"@types/ramda": "^0.31",
|
|
36
|
-
"astro": "^
|
|
37
|
-
"vitest": "^
|
|
36
|
+
"astro": "^6.0.0",
|
|
37
|
+
"vitest": "^4.1.0"
|
|
38
38
|
},
|
|
39
39
|
"repository": {
|
|
40
40
|
"type": "git",
|
package/src/index.ts
CHANGED
|
@@ -58,7 +58,7 @@ const sidebarSchema = z
|
|
|
58
58
|
/** CSS class(es) for styling the sidebar entry */
|
|
59
59
|
className: z.string().optional(),
|
|
60
60
|
/** Arbitrary metadata for custom sidebar components */
|
|
61
|
-
customProps: z.record(z.any()).optional(),
|
|
61
|
+
customProps: z.record(z.string(), z.any()).optional(),
|
|
62
62
|
/** Can category be collapsed (default: true) */
|
|
63
63
|
collapsible: z.boolean().default(true),
|
|
64
64
|
/** Start collapsed (default: true) */
|
package/src/schema.test.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { z } from 'astro/zod'
|
|
1
2
|
import { describe, expect, it } from 'vitest'
|
|
2
|
-
import { docsSchema } from './index'
|
|
3
|
+
import { docsSchema as docsSchemaFn } from './index'
|
|
4
|
+
|
|
5
|
+
const docsSchema = docsSchemaFn({ image: () => z.any() })
|
|
3
6
|
|
|
4
7
|
describe('docsSchema', () => {
|
|
5
8
|
it('should accept valid sidebar configuration', () => {
|