How to hide instance attributes from sidebar (TOC) and main content in class API reference? [Feature Request?] #779
Unanswered
JavierEscobarOrtiz
asked this question in
Q&A
Replies: 1 comment 1 reply
|
Unless you're literally typing |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I'm using mkdocstrings with the Python handler (griffe) and MkDocs Material for my library documentation. I'm trying to hide instance attributes from both the sidebar (TOC) and the main class documentation when generating the API reference for my classes.
Despite using filters in
mkdocs.ymlfile, like:the instance attributes still appear in both the left sidebar (TOC) and the main content of the class reference.
I've also tried using CSS to hide them, but that's just a workaround and not a real solution for the underlying issue.
Example
Here’s a screenshot showing the issue. I want to only display class methods in the API reference, but all the instance attributes are still listed (see sidebar and main content):
Is there any supported way to exclude instance attributes from the sidebar/TOC and main API reference, so that only methods are shown?
griffe==1.9.0
mkdocstrings==0.29.0
mkdocstrings-python==1.16.5
mkdocs-material==9.6.7
Thank you for your help!
Javi
cc: @JoaquinAmatRodrigo
All reactions