-
Notifications
You must be signed in to change notification settings - Fork 413
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
[WIP] Custom categories #281
Conversation
This is interesting, I can add support for this in the |
This is really great! Is there a reason this PR is targeting Otherwise, this looks ready to merge as-is, although some documentation is definitely needed. I wonder if this feature would be best served by introducing a |
It’s on swift-2.0 only because my project is Swift 2.0, so that's what I'm testing it on. FWIW, the swift-2.0 branch seems to be where most of the new dev is happening; it's more ahead master than behind it, if that makes sense. A |
I'd like to cut a final release of jazzy targeting Swift 1.2 and then merge
That sounds right. |
45fb73b
to
672fee6
Compare
Most of these changes are related to decoupling directory structure from navigation structure.
ac1a5c2
to
30f38ab
Compare
Sitting back down to this (at last!), I have some questions about this First, it feels like it should be a separate PR. The only reason not to do it that way is that it would involve adding and then immediately revoking a Next question: where should Jazzy look for
Opinions on that one? I tend to like 5, 3, and 1 (in that order) on first instinct, but don't have a clearly formed opinion about it. |
option 4 would be fine, 5 even better |
Sounds like 5 is the way. We good with making that a follow-up PR? If so, all we need to merge this one is some docs … right? |
Yes, the config file feature should certainly be a separate PR, and a temporary |
I just fixed the command-line help for that categories so that it's at least correct. I think this one's ready to merge? |
Running the integration tests on this PR, it's clear there are a few things that still need work. You can see these for yourself by running
|
e.g. Classes/Request/TaskDelegate.html, not Classes/TaskDelegate.html
Wow, 80 char limit. No fooling around here!
Oh right, the integration tests! Yes, that would be good, wouldn’t it? Number 1 I fixed in a previous commit, but it got re-clobbered in the midst of all the merge excitement. I’ve re-fixed it. Number 2 was more subtle, but is also fixed. I also fixed the Rubocop complaints. |
Allows customized logical grouping and ordering of the lefthand doc nav bar.
Type-based groups can make documentation hard to browse. A struct, for example, may have a closely associated protocol (and have nothing to do with another struct that happens to be next to it in alphabetical order).
A new
--categories
option accepts a YAML or JSON file containing custom categories for the top-level types:Here is what the results look like.
Ordering within each category is preserved. Any types not explicitly categorized show up under “Other Classes,” “Other Protocols,” etc.
On disk, files are still grouped by type (e.g.
Classes/Thinger.html
), not custom categories. The rationale for this is that changing the categories should not break existing links to docs for individual program elements.If the
--categories
option is not present, Jazzy behaves the same as before.This needs documentation, and probably testing as well, but I’ll wait for feedback from the core team before undertaking that.