Bug 9370 – DDoc: switch to one html file per entity (function, type etc)
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-22T11:44:00Z
Last change time
2016-06-02T20:34:30Z
Assigned to
sludwig
Creator
andrei
Comments
Comment #0 by andrei — 2013-01-22T11:44:52Z
Currently we use one HTML file per module. It's worth considering switching to a format fostering one file per entity (function, struct, class).
Comment #1 by destructionator — 2013-01-22T11:50:47Z
While it might be a decent option, I like the one file per module approach, one reason being you can search it more easily, using the built in browser text search.
Though, I've been kinda leaning toward doing my own ddoc impl with the json output anyway, which can do all kinds of organization, making dynamic pages out of it. However, like just about everything non-work I do though, it isn't finished yet!
http://dpldocs.info/std.stdio
Anyway though I like the ddoc how it is now because it is simple too. So if we change it, I think the existing behavior should at least still be available.
Comment #2 by sibaqexozequgaba — 2013-01-22T13:10:17Z
From http://forum.dlang.org/post/[email protected]
== online documentation ==
When I returned to D I felt very frustrated with D online documentation.
After looking for root of the feeling i found that the reason was that
I was used to the documentation of php.
In php each function have a page of it own. (Closely resembling the unix
man page)
This means that if I search for "php strip" google send me to
http://php.net/manual/en/function.trim.php
Where the first line tells me:
trim — Strip whitespace (or other characters) from the beginning and end
of a string
So It is very fast to see if I got the right page.
If I search for "dlang strip" I am send to
http://dlang.org/phobos/std_string.html.
Then I have to look through the document to find the right function
and to find that functions typical is missing examples and good
descriptions of parameters and return values.
(I think that the example part can be improved by automatic including
unittest in the documentation,
which would also insure that the examples is working.)
(When documents is generated ddoc could test for if description for
parameters and return values was present)
Also another thing I like about the php documentation is the user notes
at the bottom of the page,
I know you are trying to make something simmilar with the "Improve this
page" and "Page wiki" at the top,
but I have to say that I don't think it works as well.