Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update TypeDoc plugins and tweak config #7653

Merged
merged 1 commit into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ function typedocAdapter(name) {
entryPoints: [`../packages/adapter-${slug}/src/index.ts`],
tsconfig: `../packages/adapter-${slug}/tsconfig.json`,
out: `reference/adapter/${slug}`,
sidebar: {
indexLabel: name,
},
...typedocConfig,
},
]
Expand All @@ -49,7 +46,7 @@ function typedocFramework(id, entrypoints) {
entryPoints: entrypoints.map((e) => `../packages/${id}/src/${e}`),
tsconfig: `../packages/${id}/tsconfig.json`,
out: `reference/${id.replace("frameworks-", "")}`,
sidebar: { indexLabel: "index" },
skipIndexPage: true,
},
]
}
Expand Down Expand Up @@ -239,6 +236,16 @@ const docusaurusConfig = {
label: "experimental",
},
},
async sidebarItemsGenerator({ defaultSidebarItemsGenerator, ...args }) {
const sidebarItems = await defaultSidebarItemsGenerator(args)
const sidebarIdsToOmit = [
"reference/core/module.index",
"reference/sveltekit/module.index",
"reference/solidstart/index",
"reference/nextjs/module.index",
]
return sidebarItems.filter((sidebarItem) => !sidebarIdsToOmit.includes(sidebarItem.id))
},
},
theme: {
customCss: require.resolve("./src/css/index.css"),
Expand Down
6 changes: 3 additions & 3 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"@docusaurus/theme-common": "2.3.1",
"@docusaurus/theme-mermaid": "2.3.1",
"@docusaurus/types": "2.3.1",
"docusaurus-plugin-typedoc": "1.0.0-next.5",
"typedoc": "^0.24.4",
"typedoc-plugin-markdown": "4.0.0-next.6"
"docusaurus-plugin-typedoc": "1.0.0-next.12",
"typedoc": "^0.24.7",
"typedoc-plugin-markdown": "4.0.0-next.13"
},
"browserslist": {
"production": [
Expand Down
6 changes: 3 additions & 3 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ module.exports = {
{
type: "category",
label: "@auth/core",
link: { type: "doc", id: "reference/core/index" },
link: { type: "doc", id: "reference/core/module.index" },
items: [{ type: "autogenerated", dirName: "reference/core" }],
},
{
type: "category",
label: "@auth/sveltekit",
link: { type: "doc", id: "reference/sveltekit/index" },
link: { type: "doc", id: "reference/sveltekit/module.index" },
items: [{ type: "autogenerated", dirName: "reference/sveltekit" }],
},
{
Expand All @@ -36,7 +36,7 @@ module.exports = {
{
type: "category",
label: "next-auth",
link: { type: "doc", id: "reference/nextjs/index" },
link: { type: "doc", id: "reference/nextjs/module.index" },
items: [{ type: "autogenerated", dirName: "reference/nextjs" }],
},
...(process.env.TYPEDOC_SKIP_ADAPTERS
Expand Down
17 changes: 7 additions & 10 deletions docs/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"cleanOutputDir": true,
"disableSources": true,
"excludeExternals": true,
"excludeGroups": true,
"excludeInternal": true,
"excludeNotDocumented": true,
"excludePrivate": true,
"excludeProtected": true,
"hideHierarchy": true,
"gitRevision": "main",
"groupByReflections": false,
"hideBreadcrumbs": true,
"hideHierarchy": true,
"hideKindPrefix": true,
"hideGenerator": true,
"kindSortOrder": [
"Function",
Expand All @@ -36,12 +37,8 @@
"GetSignature",
"SetSignature"
],
"outputFileStrategy": "modules",
"readme": "none",
"reflectionsWithOwnFile": "none",
"sort": [
"kind",
"static-first",
"required-first",
"alphabetical"
]
}
"skipErrorChecking": true,
"sort": ["kind", "static-first", "required-first", "alphabetical"]
}
Loading