Error: Invalid sidebar file
Closed this issue · 2 comments
axel7083 commented
Using the following dependencies
- typedoc-plugin-markdown 4.0.0-next.44
- docusaurus-plugin-typedoc 1.0.0-next.26
I am using integrations/docusaurus/sidebar as recommended by @tgreyuk in #557 (comment)
However, I am getting a small issue about the document ids:
[info] Documentation generated at ./api
[ERROR] Loading of version failed for version current
Error: Invalid sidebar file at "sidebars-api.js".
These sidebar document ids do not exist:
- /classes/Disposable
- /classes/EventEmitter
....
Available document ids are:
- classes/Disposable
- classes/EventEmitter
....
It seems that a /
is prefixed and not expected. Leading to an error.
Current configuration
I am generating the documentation in its own documentation (./api
).
Here is the interesting part of docusaurus.config.js
...
[
'@docusaurus/plugin-content-docs',
{
id: 'api',
path: 'api',
routeBasePath: 'api',
sidebarPath: resolve('./sidebars-api.js'),
},
],
[
'docusaurus-plugin-typedoc',
{
id: 'api',
plugin: ['typedoc-plugin-markdown'],
entryPoints: [resolve('../packages/extension-api.d.ts')],
out: 'api',
hideBreadcrumbs: true,
readme: 'none',
tsconfig: resolve('../packages/extension-api/tsconfig.json'),
},
],
...
The sidebars-api.json
const sidebars = {
typedocSidebar: [
{
type: 'category',
label: 'Typedoc API',
link: {
type: 'doc',
id: 'api',
},
items: require('./api/typedoc-sidebar.cjs'),
},
],
};
module.exports = sidebars;
tgreyuk commented
Thanks. Yeah the plugin wasn't handling an alternative routeBasePath
.
Should be working correctly in following versions:
docusaurus-plugin-typedoc@1.0.0-next.27
typedoc-plugin-markdown@4.0.0-next.45