Automatically generate TOC menu for the specification pages#2043
Automatically generate TOC menu for the specification pages#2043wilzbach wants to merge 20 commits intodlang:masterfrom
Conversation
3bb9cfa to
448385c
Compare
|
There's quite a bit of redundancy between the grammar specifications and the table of contents: http://dtest.dlang.io/artifact/website-a8466b059a80a6ed06a54bc20933af661c945799-b8f9a919d0890d3eacff31373bc726c0/web/spec/traits.html It doesn't bother me much, but it was quite noticeable. The table of contents is especially nice on other pages, though: |
That would be very trivial to fix. The update script searches for |
I don't know if it needs to be "fixed", it was just and observation. |
Fix Issue 18202 - Show TOC overview in the dlang specification pages
|
I know that this looks quite shocking for reviewers with 45 files changed and 20 commits, but please note that most of it is generated and I used tiny commits for a very granular history. Also considering that this a similar effort was merged two years ago (dlang/tools#180) and comes up in the NG from time to time (e.g. the most recent post is http://forum.dlang.org/post/bbghyhuzuofogjxkwisb@forum.dlang.org), shows that there's quite some interested in it. (I rebased as I added a Bugzilla issue for it) |
|
Could this be done as part of the build instead of modifying the source files? |
Hmm we could add a layer on top of Ddoc, but IIRC the last time I tried to add sth. like this you weren't really happy about it either. |
That sounds like a good idea. |
The Makefile target
update-spec-tocis idempotent and thus can be called as called as part of the build process. In a later PR, we can do sth like dlang/dmd#7483 and ensure that thegitworking directory is clean or in other words that theupdate-spec-tocdidn't need to do any changes.