-
Notifications
You must be signed in to change notification settings - Fork 4
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
plugin-pages: menus are always expanded #100
Comments
This is the expected behavior for now. If you have any suggestions, feel free to turn this into a feature request. It seems related to #89. |
I understand; this just seems very odd to me (moreover an anchor must always come with a This is what I am expecting as a user (ignoring the section when I am on page when I am on page It seems that the above mentioned PR is related to what I am trying to achieve. However I have difficulties understanding why the layout is by default different depending on whether it is a mono-repository or a normal repository. |
https://github.com/StoneCypher/jssm/blob/main/typedoc-options.js All folders above the currently selected one are bold black, except the topmost The current page is also bold blue When you put two more things in |
Thanks for the response. I updated my comment to clarify that in the first case the menu was collapsed. I looked at the documentation of The now outdated typedoc pages plugin could do something like that (see example).
|
Well, not really: see the Anyway. I can add a top-level option I'm open to suggestions. Maybe this could also cover what @StoneCypher wants to do via its blind PR |
@FlorianCassayre - we have similar wants, but what I wrote doesn't do that. I wrote something else here that basically repeated what GerkinDev said, because I saw this in an old window that hadn't updated with his comment yet. As such, now that I've seen it, I deleted it, because it added nothing to the conversation and was me saying "I'll do what he just said he'll do!" The difference between what mine does and what you want is that mine won't show the other pages under any circumstances, only the one you're currently on Mine is for making an example directory that contains hundreds of examples. I don't want that list unfolding ever. |
@GerkinDev's suggestion seems to go in that direction: a configurable option would be very nice to have. I think what bugs me the most is the indentation of the pages menu compared to the Anyway, as an illustration here is what I could achieve in the past with the other (outdated) pages plugin: https://docs.arbre.app/read-gedcom/ |
Hey, updates here. I'm currently working on the support of typedoc ^0.23.0, and took the time to dig a bit around those issues. About the attribute-less If you are not satisfied by this behavior, the plugins in this repo drafts an API to render the plugin correctly in a custom theme. In the meantime, I'm working on a fallback option that replaces/alter the navigation tree in the browser via Javascript. I think it's the best I can do without purely replacing the theme. |
Thanks a lot for the updates & pointers, I understand better now. I don't know much about the internals of Typedoc yet but now that you're talking about it I think the other pages plugin used to be registered as a theme, which is probably why it could achieve all of these behaviors (as opposed to a "regular" plugin). Thus my request is likely out of the scope of this plugin; I will dig into the API on my side. |
While you should indeed implement the IPagesPluginTheme, I must admit that I've simply skipped the custom theme support for now, as you can see here: typedoc-plugins/packages/plugin-pages/src/theme-plugins/index.ts Lines 15 to 24 in 5ec724b
I will do my best to take some time to wire custom themes with the plugin. If you want to give a hand, you're absolutely welcome Btw you're absolutely right, ancestors of this plugin were themes, because typedoc did not had yet a clear distinction between themes & plugins. I chose to extend typedoc as much as I can without altering it, with virtual compatibility with any other custom themes, and it induced a couple of rather inconvenient design decisions as mentioned in #84 . I don't want this plugin to mask features of typedoc, as it moves pretty quickly and it is quite unstable. |
Hello there! For now, I'm still stabilizing the implementation & tooling, but I'll add the options we talked about pretty soon, along with JS code for collapsible menus. |
The
plugin-pages
does not appear to work correctly on simple non-monorepositories.Following the example shown on this page:
I obtain the following tree structure:
I observe that:
<a>...</a>
tagI tested other combinations of parameters but couldn't make it work correctly. I haven't tested on a mono-repository but by looking at the configuration of this very repository and seeing the result I'm assuming it works correctly in that case.
The text was updated successfully, but these errors were encountered: