-
-
Notifications
You must be signed in to change notification settings - Fork 734
Add category tag #566
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
Add category tag #566
Conversation
+1 I'd love to see this merged. A lack of class categories makes the generated docs pretty hard to use for larger modules. |
@jonchardy Let me know if there's anything else needed or docs that can be improved to tell people how they can use this. Is there a theme update or anything else recommended? |
Sure. So there are some things that should be set up to use this effectively:
Of course, people are going to want to customize their theme to use categories in different ways. Hope this helps, not sure where the best place is to document it. |
Is this possible to use in the table of contents? I can't find any "top level" way to get the categories - unless it's in |
In reference to #564. We did some custom work to add an @category tag in our build, so I figured I'd share it here. Feel free to change this as needed.
Basically, it works by looking through tags in a reflection's comment and building up a list of reflections that belong to each category in a similar manner to the way reflections are grouped by their kind (Method, Accessor, Property, etc.).
Also note, it won't really do much without some accompanying changes to a theme, but you can see some sample output if you use the JSON output option.
We mostly use this in file mode at the class level, so that's what it will work best for and I don't know how well it will work for other uses. I suppose this PR can be expanded upon if the scope needs to increase based on people who want the feature.