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

[Bug, incompatible Typedoc version]: Leaf Pages always contain the top-menu as children #358

Open
chenasraf opened this issue Apr 24, 2023 · 3 comments
Labels
scope(plugin-pages) wontfix This will not be worked on

Comments

@chenasraf
Copy link

Plugin

@knodes/typedoc-plugin-pages

Typedoc plugin(s) version(s)

@knodes/typedoc-plugin-pages@0.23.4

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):

image

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.

@chenasraf chenasraf added bug Something isn't working triage labels Apr 24, 2023
@GerkinDev
Copy link
Member

Hi,

As mentionned in the README:

Compatibility

Plugins versions should match TypeDoc major.minor.x for 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.

@GerkinDev GerkinDev added wontfix This will not be worked on scope(plugin-pages) and removed bug Something isn't working triage labels Apr 27, 2023
@GerkinDev GerkinDev changed the title [Bug]: Leaf Pages always contain the top-menu as children [Bug, incompatible Typedoc version]: Leaf Pages always contain the top-menu as children Apr 27, 2023
@chenasraf
Copy link
Author

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;
}

@GerkinDev
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope(plugin-pages) wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants