Comments (9)
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.
Thank you for the reply.
I was referring to the submodules
These are alphabetical
from pdoc.
How would you want them to be ordered?
from pdoc.
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.
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.
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.
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.
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.
it worked! Pressio/rom-tools-and-workflows#30 thank you
from pdoc.
Related Issues (20)
- 🙏 HOT 1
- explicit re-export from a private module should make the member public HOT 2
- support the `@deprecated` decorator HOT 1
- Link is not working when class is included in `__all__`
- Fails without error in CI for certain import statements HOT 5
- Add `overflow-y: hidden;` to css style `mjx-container` HOT 1
- Error parsing annotation: 'type' object is not subscriptable HOT 2
- Error importing module: no signature found for builtin type `<class 'type I wrote'>` HOT 3
- Proposal: Document each member at the lowest-level submodule, with higher level modules pointing at submodule's primary declaration without duplicating them. HOT 2
- TypeError in /pdoc/extract.py HOT 2
- add pre-commit support HOT 1
- Support `start-after` option for `.. include::` directive HOT 1
- Way to add external Markdown file HOT 2
- A way to NOT inherit documentation for a specific class HOT 4
- Store generated html docs in a folder HOT 4
- `AssertionError: OSError: If there is an error while writing to the file.` Help would be appreciated HOT 1
- Can pdoc be further automated? HOT 3
- Including markdown is buggy and local images do not work HOT 4
- PyPi upload of 14.5 seems to have failed HOT 1
- Non-deterministic behavior with set literals HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdoc.