www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - What do you use to generate documentation?

reply "Andrea Fontana" <nospam example.com> writes:
I've tried to build documentation using ddoc format and dmd.

dmd -c -D -o- ...

Generated documentation looks ugly and without stylesheet. Am I 
wrong? I expected a phobos-like documentation.

So, what do you use to generate your D docs? Doxygen or something 
else?
Mar 13 2013
parent reply "simendsjo" <simendsjo gmail.com> writes:
On Wednesday, 13 March 2013 at 09:35:18 UTC, Andrea Fontana wrote:
 I've tried to build documentation using ddoc format and dmd.

 dmd -c -D -o- ...

 Generated documentation looks ugly and without stylesheet. Am I 
 wrong? I expected a phobos-like documentation.

 So, what do you use to generate your D docs? Doxygen or 
 something else?
Ref: http://dlang.org/ddoc.html You can redefine the DDOC macro to use a stylesheet. Add your base ddoc file on the command line with redefined and additional macros. Take a look at ddox and candydoc too. http://www.dsource.org/projects/helix/wiki/CandyDoc https://github.com/jacob-carlborg/candydoc https://github.com/eldar/candydoc https://github.com/rejectedsoftware/ddox Not sure which candydoc repo is most up-to-date.
Mar 13 2013
parent reply "Andrea Fontana" <nospam example.com> writes:
On Wednesday, 13 March 2013 at 10:11:51 UTC, simendsjo wrote:
 You can redefine the DDOC macro to use a stylesheet. Add your 
 base ddoc file on the command line with redefined and 
 additional macros.
Is phobos doc based on some .ddoc file then? I see there's a number of .ddoc file in github d-programming-language repository but downloading them and adding to command line does nothing. Doc appears still without style...
Mar 13 2013
next sibling parent reply Jonathan M Davis <jmdavisProg gmx.com> writes:
On Wednesday, March 13, 2013 11:59:52 Andrea Fontana wrote:
 On Wednesday, 13 March 2013 at 10:11:51 UTC, simendsjo wrote:
 You can redefine the DDOC macro to use a stylesheet. Add your
 base ddoc file on the command line with redefined and
 additional macros.
Is phobos doc based on some .ddoc file then? I see there's a number of .ddoc file in github d-programming-language repository but downloading them and adding to command line does nothing. Doc appears still without style...
What ddoc gives you out of the box works, but it _is_ a bit ugly as far as styling goes. To match what dlang.org has, you'd need to grab std.ddoc from the d-programming-language.org repo on github along with the css directory and images directories, and the css and images directories would need to be alongside the generated html. std.ddoc handles the various macros used by Phobos and sets up the styling, and then the generated html pages reference the css and image files (so without them, you don't get the full styling). - Jonathan M Davis
Mar 13 2013
parent "Andrea Fontana" <nospam example.com> writes:
On Wednesday, 13 March 2013 at 15:47:29 UTC, Jonathan M Davis 
wrote:
 On Wednesday, March 13, 2013 11:59:52 Andrea Fontana wrote:
 On Wednesday, 13 March 2013 at 10:11:51 UTC, simendsjo wrote:
 You can redefine the DDOC macro to use a stylesheet. Add your
 base ddoc file on the command line with redefined and
 additional macros.
Is phobos doc based on some .ddoc file then? I see there's a number of .ddoc file in github d-programming-language repository but downloading them and adding to command line does nothing. Doc appears still without style...
What ddoc gives you out of the box works, but it _is_ a bit ugly as far as styling goes. To match what dlang.org has, you'd need to grab std.ddoc from the d-programming-language.org repo on github along with the css directory and images directories, and the css and images directories would need to be alongside the generated html. std.ddoc handles the various macros used by Phobos and sets up the styling, and then the generated html pages reference the css and image files (so without them, you don't get the full styling). - Jonathan M Davis
Is this command line correct? dmd -D -c -o- std.ddoc *.d It's still ugly :) Generated html doesn't contain any external css reference inside <head> section.
Mar 14 2013
prev sibling parent "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
On Wed, Mar 13, 2013 at 08:47:03AM -0700, Jonathan M Davis wrote:
 On Wednesday, March 13, 2013 11:59:52 Andrea Fontana wrote:
 On Wednesday, 13 March 2013 at 10:11:51 UTC, simendsjo wrote:
 You can redefine the DDOC macro to use a stylesheet. Add your
 base ddoc file on the command line with redefined and
 additional macros.
Is phobos doc based on some .ddoc file then? I see there's a number of .ddoc file in github d-programming-language repository but downloading them and adding to command line does nothing. Doc appears still without style...
What ddoc gives you out of the box works, but it _is_ a bit ugly as far as styling goes. To match what dlang.org has, you'd need to grab std.ddoc from the d-programming-language.org repo on github along with the css directory and images directories, and the css and images directories would need to be alongside the generated html. std.ddoc handles the various macros used by Phobos and sets up the styling, and then the generated html pages reference the css and image files (so without them, you don't get the full styling).
[...] If you don't want the hassle of hosting the docs on a webserver with separate css stylesheets, etc., you could try the simple macros I wrote for generating nicer-looking ddocs: https://github.com/quickfur/Viola-ddoc-macros/blob/master/viola.ddoc It does have some hooks for customization, but right now it's just a very rough, but OK-looking drop-in replacement for the default ddoc output. T -- Bomb technician: If I'm running, try to keep up.
Mar 13 2013