Skip to content

Commit 6aab2ff

Browse files
authored
feat(#478 | docs): setup TypeDoc and integrate with Docusaurus (#508)
1 parent 9a236a5 commit 6aab2ff

6 files changed

Lines changed: 730 additions & 581 deletions

File tree

β€Ždocs/.gitignoreβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
# Should be generated on build by the plugin
88
/static/llms.txt
99

10+
# Typedoc generated folder
11+
/docs/api-reference
12+
1013
# Generated files
1114
.docusaurus
1215
.cache-loader

β€Ždocs/docs/api-reference.mdβ€Ž

Lines changed: 0 additions & 226 deletions
This file was deleted.

β€Ždocs/docusaurus.config.jsβ€Ž

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,45 @@ const config = {
9191
],
9292
},
9393
],
94+
[
95+
'docusaurus-plugin-typedoc',
96+
{
97+
id: 'api-hypergraph',
98+
entryPoints: ['../packages/hypergraph/src/index.ts'],
99+
tsconfig: '../packages/hypergraph/tsconfig.json',
100+
out: 'docs/api-reference/hypergraph',
101+
readme: 'none',
102+
name: 'Hypergraph',
103+
categorizeByGroup: false,
104+
excludeExternals: true,
105+
excludePrivate: true,
106+
excludeProtected: true,
107+
sidebar: {
108+
autoConfiguration: true,
109+
pretty: true,
110+
},
111+
},
112+
],
113+
[
114+
'docusaurus-plugin-typedoc',
115+
{
116+
id: 'api-hypergraph-react',
117+
entryPoints: ['../packages/hypergraph-react/src/index.ts'],
118+
tsconfig: '../packages/hypergraph-react/tsconfig.json',
119+
out: 'docs/api-reference/hypergraph-react',
120+
readme: 'none',
121+
name: 'Hypergraph React',
122+
categorizeByGroup: false,
123+
excludeExternals: true,
124+
excludePrivate: true,
125+
excludeProtected: true,
126+
skipErrorChecking: true,
127+
sidebar: {
128+
autoConfiguration: true,
129+
pretty: true,
130+
},
131+
},
132+
],
94133
],
95134

96135
presets: [

β€Ždocs/package.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"devDependencies": {
2626
"@docusaurus/module-type-aliases": "3.8.1",
2727
"@docusaurus/types": "3.8.1",
28-
"docusaurus-plugin-llms": "^0.1.5"
28+
"docusaurus-plugin-llms": "^0.1.5",
29+
"docusaurus-plugin-typedoc": "^1.4.2"
2930
},
3031
"browserslist": {
3132
"production": [

β€Ždocs/sidebars.jsβ€Ž

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
1515
@type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
1616
*/
17+
import typedocSidebarHypergraph from './docs/api-reference/hypergraph/typedoc-sidebar.cjs';
18+
import typedocSidebarHypergraphReact from './docs/api-reference/hypergraph-react/typedoc-sidebar.cjs';
19+
1720
const sidebars = {
1821
// By default, Docusaurus generates a sidebar from the docs folder structure
1922
docs: [
@@ -34,7 +37,24 @@ const sidebars = {
3437
{ type: 'doc', id: 'filtering-query-results', label: 'πŸ” Filtering Query Results' },
3538
{ type: 'doc', id: 'space-invitations', label: 'πŸ”— Space Invitations' },
3639
{ type: 'doc', id: 'inboxes', label: 'πŸ” Inboxes' },
37-
// { type: 'doc', id: 'api-reference', label: 'πŸ“š API Reference' },
40+
{
41+
type: 'category',
42+
label: 'πŸ“š API Reference',
43+
items: [
44+
{
45+
type: 'category',
46+
label: 'Hypergraph',
47+
link: { type: 'doc', id: 'api-reference/hypergraph/index' },
48+
items: typedocSidebarHypergraph,
49+
},
50+
{
51+
type: 'category',
52+
label: 'Hypergraph React',
53+
link: { type: 'doc', id: 'api-reference/hypergraph-react/index' },
54+
items: typedocSidebarHypergraphReact,
55+
},
56+
],
57+
},
3858
{ type: 'doc', id: 'troubleshooting', label: 'πŸ› οΈ Troubleshooting' },
3959
{ type: 'doc', id: 'faq', label: '❓ FAQ' },
4060
{

0 commit comments

Comments
Β (0)