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

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:

>makeDocs

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:

Usage: goldie-gendocs [options] main-template-file [options] Example: goldie-gendocs docssrc/docs.tmpl --help, /? Displays this help screen -d, --od <dir> Output directory (default: ".") -i, --of <index-name> Filename of output pages (default: "index.html") --trimlink Trim filename from internal links -q, --quiet Quiet mode --ast Save abstract syntax trees to JSON (for use in JsonViewer) --astd <dir> JSON AST output directory (implies --ast) (default: curr dir)

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