@rizom/site-docs 0.2.0-alpha.142
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/package.json +44 -0
- package/src/index.ts +1 -0
- package/src/site.ts +62 -0
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rizom/site-docs",
|
|
3
|
+
"version": "0.2.0-alpha.142",
|
|
4
|
+
"description": "Docs site package for docs.rizom.ai hosted deployments",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./src/index.ts"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"typecheck": "tsc --noEmit",
|
|
14
|
+
"test": "bun test",
|
|
15
|
+
"lint": "eslint . --max-warnings 0",
|
|
16
|
+
"lint:fix": "eslint . --max-warnings 0 --fix",
|
|
17
|
+
"postpack": "publish-manifest restore",
|
|
18
|
+
"prepack": "publish-manifest prepare"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@rizom/site": "0.2.0-alpha.142",
|
|
22
|
+
"preact": "^10.27.2"
|
|
23
|
+
},
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/rizom-ai/brains.git",
|
|
30
|
+
"directory": "sites/docs"
|
|
31
|
+
},
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"author": "Yeehaa <yeehaa@rizom.ai> (https://rizom.ai)",
|
|
34
|
+
"homepage": "https://github.com/rizom-ai/brains/tree/main/sites/docs#readme",
|
|
35
|
+
"bugs": {
|
|
36
|
+
"url": "https://github.com/rizom-ai/brains/issues"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"bun": ">=1.3.3"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@rizom/brain": ">=0.2.0-alpha.136 <0.3.0"
|
|
43
|
+
}
|
|
44
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { docsSite, docsSite as default } from "./site";
|
package/src/site.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Fragment, h, type ComponentChildren, type JSX } from "preact";
|
|
2
|
+
import type { RouteDefinitionInput, SiteDefinition } from "@rizom/site";
|
|
3
|
+
|
|
4
|
+
const docsSections = [
|
|
5
|
+
{
|
|
6
|
+
id: "docs",
|
|
7
|
+
template: "docs:doc-list",
|
|
8
|
+
dataQuery: {
|
|
9
|
+
entityType: "doc",
|
|
10
|
+
query: { limit: 100 },
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
const docsRoutes: RouteDefinitionInput[] = [
|
|
16
|
+
{
|
|
17
|
+
id: "docs-home",
|
|
18
|
+
path: "/",
|
|
19
|
+
title: "Documentation",
|
|
20
|
+
description: "Brains documentation",
|
|
21
|
+
layout: "default",
|
|
22
|
+
navigation: {
|
|
23
|
+
show: true,
|
|
24
|
+
label: "Docs",
|
|
25
|
+
slot: "primary",
|
|
26
|
+
priority: 10,
|
|
27
|
+
},
|
|
28
|
+
sections: docsSections,
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "docs",
|
|
32
|
+
path: "/docs",
|
|
33
|
+
title: "Documentation",
|
|
34
|
+
description: "Brains documentation",
|
|
35
|
+
layout: "default",
|
|
36
|
+
sections: docsSections,
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
const DocsLayout = ({
|
|
41
|
+
sections,
|
|
42
|
+
}: {
|
|
43
|
+
sections: ComponentChildren[];
|
|
44
|
+
}): JSX.Element => h(Fragment, null, ...sections);
|
|
45
|
+
|
|
46
|
+
export const docsSite: SiteDefinition = {
|
|
47
|
+
layouts: {
|
|
48
|
+
default: DocsLayout,
|
|
49
|
+
},
|
|
50
|
+
routes: docsRoutes,
|
|
51
|
+
entityDisplay: {
|
|
52
|
+
doc: {
|
|
53
|
+
label: "Doc",
|
|
54
|
+
pluralName: "docs",
|
|
55
|
+
layout: "default",
|
|
56
|
+
paginate: false,
|
|
57
|
+
navigation: { show: false },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default docsSite;
|