-
-
Notifications
You must be signed in to change notification settings - Fork 380
generate module menu #907
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
generate module menu #907
Conversation
MartinNowak
commented
Feb 17, 2015
- automatically keeps tree in sync
- avoids std_navbar-VERSION.ddoc files for every alpha/beta/rc release
Ahhh, I think chmgen relies on that... I had to contort the macros in many ways until I got something that could emit half-decent HTML and something close to consistent JSON |
Turns out that std_navbar-VERSION.ddoc idea is really ugly for release building, because we'd need I std_navbar-2.067.0-alpha1/beta1/rc2 and can't build dlang.org from a non-tagged branch because std_navbar-master.ddoc doesn't make sense. So I wrote this tool to auto-generate the list of all modules. |
I didn't change chm-nav.dd and the macros have the same structure. |
OK, if the generated .json files didn't change then it wouldn't affect it. But even if they're not, JSON output should be easy to add to the new D program :) |
Preview is here https://dlang.dawg.eu/ (with .htaccess redirects ;)). |
Erm: https://dlang.dawg.eu/phobos/std_container_array.html Funny, latest DDox has exactly the same bug. |
What's wrong with that? |
"container" and "array" are both highlighted. |
No dead links added ™️. |
Wait, will fix, dpl-docs uses that same (sane) list header ul structure. |
So I can either only mark the leave as active (not it's parents) or you can come up with a nice css rule to select the most nested |
Isn't that what the behavior is now? |
Now it is :). |
Well, now "std" isn't painted red when it's expanded... |
Any idea? I don't really want to add css rules for any possible |
It's too late over here for nested CSS rules, but one thing that's gotta work is to just keep throwing more JavaScript at it ;) |
Updated and fixed MartinNowak@fb1e638. |
# exclude lists | ||
MOD_EXCLUDES_PRERELEASE=--ex=gc. --ex=rt. --ex=core.internal. --ex=core.stdc.config --ex=core.sys. \ | ||
--ex=std.c. --ex=std.algorithm.internal --ex=std.internal. --ex=std.regex.internal. \ | ||
--ex=std.typelist --ex=std.windows. --ex=etc.linux.memoryerror |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use $(addprefix)
?
LGTM, deferring to @andralex for review of approach and Makefile stuff |
# (additionally to the phobos-prerelease directory) | ||
# when 2.067 is released. | ||
|
||
RewriteRule ^(phobos/std_container)_package\.html $1.html [R=301,L] | ||
RewriteRule ^(phobos-prerelease/std_container)_package\.html $1.html [R=301,L] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @CyberShadow , I think he was looking into that too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine but I'd put it on one line (^(phobos(-prerelease)?/std_...
).
71393a1
to
18067a4
Compare
std.c. std.algorithm.internal std.internal. std.regex.internal. std.typelist \ | ||
std.windows. etc.linux.memoryerror) | ||
|
||
MOD_EXCLUDES_RELEASE=$(MOD_EXCLUDES_PRERELEASE) --ex=core.stdc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was some grumbling on iRC today about us not even having a list of available C functions (even with placeholder documentation). It might be worth it to list them if only because you can use a web search to find which module a function is in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean this?
https://dlang.dawg.eu/phobos-prerelease/core_stdc_stdio.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Nice. Ideally we'd also link to cppreference OSLT.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't find the opengroup link particularly useful either, but for some reason it was chosen.
OK, one part left #914. Then I don't know how to shrink this pull even further. In the meantime I'm trying to find out how to correctly build docs on Windows, because Nick's old recipe no longer works. |
Looks fine at a glance, how is it broken? |
I think I see it, there's no |
That would also explain the fickle Druntime style bugs - since both win32.mak files build the Druntime docs (talk about redundancy), the first one builds broken ones and the second sees that they're already built, and doesn't rebuild them. |
- automatically keeps tree in sync - avoids std_navbar-VERSION.ddoc files for every alpha/beta/rc release - shared exclude patterns for modlist and dpl-docs - tiny menu structure change, list heading is no longer a separate <li> this is simpler and semantically more correct `<li><h7>package</h7></li><li><ul><li>mod1</li></ul></li>` => `<li><h7>package</h7><ul><li>mod1</li></ul></li>` - adapt highlighting of menu entries accordingly - optimize querying the currently selected li using an attribute selector
I'll merge this since this was open for a while and there were no objections. |
Any idea what's up with this?
|