www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - How to generate non-empty html documentation / invoke ddoc?

reply Joost 't Hart <Joost.t.Hart planet.nl> writes:
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.

Cheers,
Joost.
Dec 21 2010
parent reply Stanislav Blinov <blinov loniir.ru> writes:
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 you put module hello; after your doc line, you should get it in the documentation.
Dec 21 2010
parent Joost 't Hart <Joost.t.Hart planet.nl> writes:
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 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.
Dec 21 2010