Skip to content

Commit 0b04031

Browse files
committed
Improve website API reference
1 parent 7306ae0 commit 0b04031

File tree

4 files changed

+257
-19
lines changed

4 files changed

+257
-19
lines changed

website/docs/sidebars.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@ module.exports = {
44
type: "autogenerated",
55
dirName: ".", // generate sidebar slice from the docs folder (or versioned_docs/<version>)
66
},
7-
{
8-
type: "link",
9-
label: "API",
10-
href: "/docs/api",
11-
},
127
],
138
};

website/docusaurus.config.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const path = require("path");
2+
13
/** @type {import('@docusaurus/types').DocusaurusConfig} */
24
module.exports = {
35
title: "React Spreadsheet",
@@ -19,6 +21,11 @@ module.exports = {
1921
label: "Docs",
2022
position: "left",
2123
},
24+
{
25+
to: "api",
26+
label: "API",
27+
position: "left",
28+
},
2229
// Please keep GitHub link to the right for consistency.
2330
{
2431
href: "https://github.com/iddan/react-spreadsheet",
@@ -52,16 +59,15 @@ module.exports = {
5259
],
5360
plugins: [
5461
[
55-
"docusaurus-plugin-typedoc",
62+
"docusaurus-plugin-typedoc-api",
5663
{
57-
entryPoints: ["../src/index.ts"],
58-
tsconfig: "../tsconfig.json",
59-
out: "api",
60-
readme: "none",
61-
excludeNotDocumented: true,
62-
plugin: ["typedoc-plugin-rename-defaults"],
64+
projectRoot: path.resolve(__dirname, ".."),
65+
packages: ["."],
6366
exclude: ["**/*.test.ts", "**/*.test.tsx", "**/*.stories.tsx"],
64-
readmeTitle: "API",
67+
typedocOptions: {
68+
excludeNotDocumented: true,
69+
plugin: ["typedoc-plugin-rename-defaults"],
70+
},
6571
},
6672
],
6773
],

website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@svgr/webpack": "^5.5.0",
2828
"@types/react": "^17.0.19",
2929
"clsx": "^1.1.1",
30-
"docusaurus-plugin-typedoc": "^0.19.2",
30+
"docusaurus-plugin-typedoc-api": "^3.0.0",
3131
"file-loader": "^6.2.0",
3232
"react": "^17.0.1",
3333
"react-dom": "^17.0.1",

0 commit comments

Comments
 (0)