Bug 11891 – Ddoc should generate index table

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-10T01:41:10Z
Last change time
2024-12-13T18:15:47Z
Keywords
ddoc
Assigned to
No Owner
Creator
Jacob Carlborg
Moved to GitHub: dmd#18751 →

Comments

Comment #0 by doob — 2014-01-10T01:41:10Z
Ddoc should be able to generate a table like the two on top of std.algorithm [1]. This can be done as follows: * Introduce a new ddoc macro, $(CATEGORY, category_name), that is recognized by the compiler * Add the $(CATEGORY) macro to all symbols as appropriate * For generating the first table ddoc will use the specified $(CATEGORY) and the symbol name the compiler already knows about * For the second table it would do the same as above but also include the summary (first paragraph) from the documentation of the symbol * If a symbol is missing the $(CATEGORY) macro it's still listed in the table but not in a category [1] http://dlang.org/phobos/std_algorithm.html
Comment #1 by hsteoh — 2014-06-26T05:17:39Z
Perhaps a better syntax is to use a Category: section in the ddoc comment, and use $(CATEGORY myCategory) to generate the table of symbols for that category.
Comment #2 by greensunny12 — 2018-02-10T20:23:33Z
Status quo: (1) JavaScript hack to generate a "quickIndex" However because (1) looked too ugly, a manual BOOKMARK table has been added to most modules. Generating a grouped BOOKMARK table automatically is really hard though. FWIW ddox and adrdox can generate index tables out of the box. I'm not sure if anyone plans to actively develop Ddoc. Migration to Ddox for dlang.org is WIP though it might never happen.
Comment #3 by robert.schadek — 2024-12-13T18:15:47Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18751 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB