GithubHelp home page GithubHelp logo

Comments (9)

mhils avatar mhils commented on June 8, 2024

The sidebar sorts exactly like the page contents, that is in order of declaration in the Python file. For example, on https://pdoc.dev/docs/pdoc/doc.html, you can see that Module comes before Class. What are you looking for?

from pdoc.

fnrizzi avatar fnrizzi commented on June 8, 2024

Thank you for the reply.
I was referring to the submodules
These are alphabetical

image

from pdoc.

mhils avatar mhils commented on June 8, 2024

How would you want them to be ordered?

from pdoc.

fnrizzi avatar fnrizzi commented on June 8, 2024

I would like to choose how to order them. for my case, alphabetical order does not make sense. There is a clear logical order , from basic to more advanced modules, so I would like to reflect that.

I did try to customize the order by using the customization suggested and modifying the "submodules" jinja2 block but that did not work fully. Some submodules ended up with broken links.

So I was just going to ask if there is a way or, if not, suggest to add such an option. I think in general it would be useful.

from pdoc.

mhils avatar mhils commented on June 8, 2024

There is no way to customize the order at the moment, and I don't think that feature meets the bar of general applicability/usefulness unfortunately. Sorry!

from pdoc.

fnrizzi avatar fnrizzi commented on June 8, 2024

I don't think that feature meets the bar of general applicability/usefulness unfortunately

I don't quite agree with this. How is this feature not useful in general?
Pretty much every scientific library for example has an inherent "logical" order for exploring/understanding things.
So NOT having this functionality poses an immediate block to the usability of the documentation.
Since a documenation's first purpose is to explain things, i believe this is critical.

from pdoc.

fnrizzi avatar fnrizzi commented on June 8, 2024

if you don't want to support it, can you please at least point me to where in the pdoc source I can find the code that sorts the submodules in the sidebar?

from pdoc.

mhils avatar mhils commented on June 8, 2024

Sure! The implementation is at https://github.com/mitmproxy/pdoc/blob/v14.1.0/pdoc/doc.py#L455. From a brief glance it looks like you may actually be able to add custom sorting by specifing __all__, so maybe that's a feature we actually have. :)

from pdoc.

fnrizzi avatar fnrizzi commented on June 8, 2024

it worked! Pressio/rom-tools-and-workflows#30 thank you

from pdoc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.