typedoc-plugins
typedoc-plugins copied to clipboard
[Bug, incompatible Typedoc version]: Leaf Pages always contain the top-menu as children
Plugin
@knodes/typedoc-plugin-pages
Typedoc plugin(s) version(s)
@knodes/[email protected]
Typedoc version
0.24.6
Describe the problem
Hi, thanks for all your work on this plugin!
I am having trouble with the menu in the output.
Here is my config:
{
"pluginPages": {
"source": "docs",
"pages": [
{
"name": "Configuration",
"childrenSourceDir": "./docs",
"children": [
{
"name": "CLI usage",
"source": "cli.md"
},
{
"name": "Node.js usage",
"source": "node.md"
},
{
"name": "Templates",
"source": "templates.md"
},
{
"name": "Configuration Files",
"source": "configuration_files.md"
}
]
}
]
}
}
But the output looks like this (notice the duplication, highlighted in red):

What did you expected ?
I expect the pages to be the bottom of the navigation in these subsections. Not sure what I've done wrong.
I have toyed around with childrenDir, childrenSourceDir and children sub-grouping but to no avail.
Hi,
As mentionned in the README:
Compatibility
Plugins versions should match TypeDoc
major.minor.xfor compatibility.
You're using plugins v0.23, incompatible with Typedoc v0.24. I'm even surprised it worked at all.
I'm still trying to find time to make a 0.24-compatible version, but I'm super busy right now. So as far as I'm concerned, this is not a bug.
If Typedoc 0.23.x does the work for you, I recommend you rollback to it waiting for the plugin to be updated.
Very well, I have used a workaround with a custom CSS file for now, will do for the meantime :)
If anyone else is interested, this is the relevant CSS, also note the comments
/* replace "Configuration" and "Changelog" with relevant keys from `data-key` on `.tsd-index-accordion` */
.tsd-index-accordion[data-key*="Configuration."] ul.tsd-nested-navigation,
.tsd-index-accordion[data-key*="Configuration."] .tsd-accordion-summary > svg,
.tsd-index-accordion[data-key="Changelog"] ul.tsd-nested-navigation,
.tsd-index-accordion[data-key="Changelog"] .tsd-accordion-summary > svg,
/* Change the n + 6 to the correct number according to the menu items you have */
.tsd-index-accordion[data-key="Configuration"] li:nth-child(n + 6) {
display: none;
}
Awesome trick, super clever ! Still, I recommend you to be super careful when updating Typedoc, it might break with this plugin entierly at any point