-
-
Notifications
You must be signed in to change notification settings - Fork 196
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
Configure module index #318
Comments
At the moment we do the following:
If you see other behavior, please report a bug.
I think you are raising a reasonable point here that the module index often isn't too useful, but prominently displayed. Maybe we can do something like this:
Does that make sense? I don't know how much value people get out of the module index at the moment, personally speaking I wouldn't miss it too much if navigation still works.
Regarding the logo parts, you can change the logo by overwriting the |
@mhils For my use case (document and indexing a list of standalone scripts for quick navigation) having a left module index is absolutely fundamental. I would even like it more if it offered some kind of sorting (by module name, file datetime, file size, ...) or even showing some more info (date last modified, as an additional pdoc.render.configure(show_datetime) option). |
I would like to keep pdoc laser-focused on API documentation for small projects. I don't think file size or datetime would useful to documentation consumers in these cases, so that's nothing I'd like to add to pdoc. |
I understand. I was suggesting it as an option (turned off by default).
|
Every option is costly: It increases maintenance burden and also cognitive burden for users, who are faced with an ever-increasing list of options. Long story short, my responsibility as the maintainer of pdoc is to say no to some suggestions. :) |
No problem ... I just feel the need to explain because somebody else had raised thumb to my comment. Probably nothing I will be ever able to do, but just in case: which .py files should I focus on if I ever grow up as a developer to retouch index myself? |
Hey @mhils I'll be looking into contributing the feature(s) you discussed in your comment in the future, just haven't gotten around to it yet. |
@mhils Again, this is a new question closely related to the index, but not to this issue. I have noticed the similar look between pdoc produced documentation (left index with links to each module content in the main frame), and the look of pdoc's web documentation in this page: https://pdoc.dev/docs/pdoc.html (similar left index, but with an additional tree-look). Two questions come to my mind:
I ask this because in my pdoc-generated index, there is not such indentation (i.e. the examples I sent you some days ago). |
The pdoc docs are created using pdoc itself: https://github.com/mitmproxy/pdoc/blob/main/docs/make.py. There is almost no customization. |
Hi @mhils thanks for taking it upon yourself to implement this! I was wrapped up with other things, and documentation didn't take priority currently - sorry! I added some comments to your PR but overall I think it's great and fits the simplistic approach of pdoc. |
No worries - thanks for the review! This is in the main branch now and will be part of the next release. If you for some reason insist on having a module index, one workaround is to add a second non-public module to the specs, e.g.
This makes pdoc believe that multiple modules are being documented, even though the _json module is hidden in the UI because it's private. |
Just updating you on the ticket that we've tried out the changes in production, and can confirm that I (or we) quite like them. Thanks a lot! |
Problem Description
Currently when generating via pdoc, the
index.html
creates a "module" index with no content, other then a search bar.When using the documentation, all pages also contain a relative link to this module index, making it inevitable to be seen by customers.
Proposal
I would like to be able to configure the logo, and default content. Ideally specify one module and render that modules description. Ofc this has the additional problem of duplicating documentation - so not sure how to approach this best.
The text was updated successfully, but these errors were encountered: