Description

Powerful alternative to DMD's DDOC engine.

Package Information

Version 0.15.18 (2016-Dec-25)
Homepage https://github.com/rejectedsoftware/ddox
Repository https://github.com/rejectedsoftware/ddox
License MIT
Authors Sönke Ludwig
Registered by Sönke Ludwig
Dependencies

vibe-d:web

hyphenate

libdparse

Installation

To use this package, put the following dependency into your project's dependencies section:

dub.json
dub.sdl

Readme

DDOX documentation engine

This is an alternative documentation generator for programs written in the D programming language. It aims to be fully compatible with Ddoc (the documentation generator built into the D compiler). Additional features include:

  • Advanced page-per-symbol layout based on Diet templates
  • Full automatic cross-referencing
  • Automatically generated index, search database and site map
  • Filtering of symbols and modules based on their name and protection level
  • Integrated web server for fast local documentation serving
  • Directly embeddable into vibe.d applications

For real world examples see the vibe.d API documentation and the D standard library documentation.

Build Status

First steps

  1. Install dub
  2. Generate JSON for your project by adding the command line switches -D -X -Xfdocs.json to your DMD command line (Note that you may need to clean up all the generated .html files afterwards)
  3. Check out ddox and run dub build from its root folder

Note that DDOX uses vibe.d, which currently by default uses libevent as its core. Please follow its installation instructions, too, if necessary.

Filtering docs

You can filter the JSON file using ddox filter <path_to_json>.

The following command will filter out all modules starting with "core.sync.", except those starting with "core.sync.mutex" or "core.sync.condition". --in always takes precedence over --ex here. Additionally, all members with a protection lower than public will be filtered out.

./ddox filter path/to/docs.json --ex core.sync. --in core.sync.mutex --in core.sync.condition --min-protection Public


Serving the docs on localhost

Ensure your current working directory contains ddox's directory "public", or a modified version of it (otherwise the CSS stylings and JavaScript extras won't work).

cd path/to/ddox

Then, simply run the following command and go to http://127.0.0.1:8080/

./ddox serve-html path/to/docs.json

Generating offline documentation

The following commands will generate HTML docs (along with the default CSS stylings and JavaScript extras) in the folder "destination/path/public":

cp -r path/to/ddox/public destination/path
./ddox generate-html path/to/docs.json destination/path/public


Built-in support in DUB

Documentation for DUB projects can be built as simple as by running the following command within the project's directory:

dub build -b ddox

The "-ddoxFilterArgs" field in dub.json (resp. x:ddoxFilterArgs in dub.sdl) can be used to customize the included contents.

Quickly serving the documentation on a local HTTP server, which is usually faster than writing out all HTML files to disk, is also possible:

dub run -b ddox


DDOX specific Ddoc macros

Apart from the standard set of predefined macros, DDOX defines a macro DDOX_ROOT_DIR, which contains the relative path to the root of the documentation hierarchy (ending with a slash). It can be used to link to resources that reside in a fixed location within the same directory tree.

Available versions

0.15.18 0.15.17 0.15.16 0.15.15 0.15.14 0.15.13 0.15.12 0.15.11 0.15.10 0.15.9 0.15.8 0.15.7 0.15.6 0.15.5 0.15.4 0.15.3 0.15.2 0.15.1 0.15.0 0.14.3 0.14.2 0.14.1 0.14.0 0.13.5 0.13.4 0.13.3 0.13.2 0.13.1 0.13.0 0.12.1 0.12.0 0.11.5 0.11.4 0.11.3 0.11.2 0.11.1 0.11.0 0.10.9 0.10.8 0.10.7 0.10.6 0.10.5 0.10.4 0.10.3 0.10.2 0.10.1 0.10.0 0.9.22 0.9.21 0.9.20 0.9.19 0.9.18 0.9.17 0.9.16 0.9.15 0.9.14 0.9.13 0.9.12 0.9.11 0.9.10 ~master ~change_nav_default