Skip to content

Commit

Permalink
fix: Handle alternative docusaurus routeBasePath
Browse files Browse the repository at this point in the history
  • Loading branch information
tgreyuk committed Jan 30, 2024
1 parent 79f6485 commit e415969
Show file tree
Hide file tree
Showing 13 changed files with 17,477 additions and 8,220 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-jobs-fetch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"docusaurus-plugin-typedoc": patch
---

- Handle alternative docusaurus `routeBasePath`.
1 change: 1 addition & 0 deletions devtools/examples/docusaurus2/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# Production
/build
/docs
/api

# Generated files
.docusaurus
Expand Down
6 changes: 4 additions & 2 deletions devtools/examples/docusaurus2/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const config = {
'../../../packages/typedoc-plugin-markdown/test/fixtures/typedoc.cjs',
),
),
out: 'api',
entryPoints:
'../../../packages/typedoc-plugin-markdown/test/fixtures/src/reflections/index.ts',
expandObjects: true,
sidebar: { pretty: true, filteredIds: ['api/index'] },
},
],
Expand All @@ -64,6 +64,8 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
path: 'api',
routeBasePath: 'api',
sidebarPath: require.resolve('./sidebars.js'),
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
Expand Down Expand Up @@ -96,7 +98,7 @@ const config = {
src: 'img/logo.svg',
},
items: [
{ to: '/docs/api', label: 'API', position: 'left' },
{ to: '/api', label: 'API', position: 'left' },
{
href: 'https://github.com/facebook/docusaurus',
label: 'GitHub',
Expand Down
4 changes: 2 additions & 2 deletions devtools/examples/docusaurus2/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ const sidebars = {
label: 'DOCS',
link: {
type: 'doc',
id: 'api/index',
id: 'index',
},
items: require('./docs/api/typedoc-sidebar.cjs'),
items: require('./api/typedoc-sidebar.cjs'),
},
],
};
Expand Down
Loading

0 comments on commit e415969

Please sign in to comment.