How to generate non-empty html documentation / invoke ddoc?

Joost 't Hart Joost.t.Hart at planet.nl
Tue Dec 21 09:11:31 PST 2010


On 12/21/2010 05:28 PM, Stanislav Blinov wrote:
> 21.12.2010 19:16, Joost 't Hart пишет:
>> Hi,
>>
>> Whatever I have tried so far, no documentation is generated from my .d
>> stuff. Guess my (doxygen biassed) expectation is wrong and (probably
>> that is why) http://www.digitalmars.com/d/2.0/ddoc.html does not ring
>> the bell here. What do I miss?
>>
>> $ cat hello.d
>> /// This program cries hello
>>
>> /* The above line is expected in my documentation */
>>
>> import std.stio;
>>
>> void main()
>> {
>> writeln( "Goeiendag!" );
>> }
>>
>> $ dmd -D -Dd. -Dfhello.html hello.d
>>
>> The html file produced only contains a "<h1>Hello</h1>" title and a
>> small footer with the generated-by disclaimer. The in-between part is
>> empty.
>>
>> Should I provide a (.dd??) template somehow?
>>
>> Any advice appreciated.
> If I'm not mistaken, documentation applies to declarations that follow.
> If you put
> module hello;
> after your doc line, you should get it in the documentation.

Right! Thanks.

Found out additionally that ddoc is sort-of scope aware: If you want to 
see the doc text attached to some class method, the class itself must 
also have some documentation.
There is some logic in there... yet would be nice to find an overview of 
all the tricks involved.

Cheers,
Joost.


More information about the Digitalmars-d-learn mailing list