Parsing System (v0.8)
Goldie Home (v0.8) -> Goldie's Tools -> GenDocs


NOTE: GenDocs might become deprecated in a future version of Goldie in favor of Ddoc.

Generates Goldie's documentation. Also serves as an example of Goldie in action.

GenDocs is a tool created to generate HTML documentation from template files. It was created specifically for Goldie, but is general enough that it should be usable for many other projects (although some of its features are oriented towards D-based projects).

GenDocs does not parse source as other doc-generating tools do (such as Ddoc or NaturalDocs). So GenDocs is primarily suited for projects where extra flexibility is desired, and for projects with source that's too complicated for typical source-parsing generators to handle (for instance, if special preprocessing is done on the source).

A helper script is provided to make it easy to use GenDocs to generate Goldie's documentation. From the main Goldie directory:


That will generate Goldie's documentation and place it in {goldie root}/docs. To view the generated documentation, open {goldie root}/docs/index.html in your web browser.

If you want to serve the documentation from a web server, it is recommended that you use the --trimlink command-line parameter:

>makeDocs --trimlink

That will remove the index.html from all internal links in the documentation (ie, links will be like PageName/ instead of PageName/index.html).

If your server isn't configured to use index.html as the default file for a directory, you can use a different filename with the --of: parameter:

>makeDocs --trimlink --of:Default.htm

Command-line parameters:

Sample Usage: goldie-gendocs docssrc/docs.tmpl Switches: (Prefixes can be '/', '-' or '--') ('[]' means multiple switches are accepted) -help Displays a help summary and exits -detail Displays a detailed help message and exits <text> (Required) Main template file -od:<text> Output directory (default: ".") -of:<text> Filename of output pages (default: "index.html") -trimlink Trim filename from internal links -q Quiet mode -ast Save abstract syntax trees to JSON (for use in JsonViewer) -astd:<text> JSON AST output directory (implies -ast) (default: curr dir)

See Template Format for a detailed explanation of the GenDocs template syntax.