hgen 0.6.0

Documentation generator for D.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

hgen is free software distributed under the Boost Software License in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.

hgen

Documentation generator for D with limited Markdown support and DDoc, based on harbored-mod. The generated documentation is in HTML format.

Official repositories:

Features

  • Very fast.
  • No heavy dependencies — only libdparse.
  • Supports DDoc and (with some differences) Markdown syntax.
  • Sensible defaults (get decent documentation without tweaking any settings).
  • Automatic cross-referencing in code blocks and inline code.
  • Generates one file per module/class/struct/enum, etc.
  • Generated documentation works without JavaScript (e.g., with NoScript). JS may be used for optional functionality.
  • All command-line options can be set in the config file `hgen.cfg`.

See example of generated documentation:

Differences from vanilla Markdown

Sequence --- will not generate a horizontal line, as it is used for DDoc blocks. Use - - - instead. This is still standard Markdown.

Emphasis can be denoted by *, but not by _ (this would break snake_case names).

Also this does not work (again because DDoc uses --- to mark code blocks):

Subheading
----------

Instead, use either (standard Markdown):

## Subheading

Getting started

Build from source

You can use make to build the application or dub directly.

Regular usage of dub:

dub fetch hgen
dub build -v hgen

The output will show the directory containing the compiled binary, like: ~/.dub/packages/hgen/<version>/hgen/build.

You can copy it to a directory in your directory. Example:

cp ~/.dub/packages/hgen/0.6.0/hgen/build/hgen /usr/local/bin/

Or use hgen with dub run (see the "Usage" section).

Ready-made packages

You can use our packages prepared for several popular Linux distributions (Debian, Ubuntu, OpenSUSE, Fedora, Arch Linux).

See: Download Page

The page contains installation instructions for various projects, including hgen.

Usage

From your directory with sources, run hgen. You can also specify a directory of individual files:

hgen source/

This command will write documentation to the ./doc directory.

More details:

hgen --help
Notice about dub

If you want to use dub-based build:

dub run hgen -- <hgen args>

Example:

dub run hgen -- --help   # show help
dub run hgen -- source/  # generate documentation for the 'source' dir

Credits

This project is a fork of harbored-mod (maintained by the Dlang community). Harbored-mod was continued in a new repository by Basile.B; some ideas from this new repository was added on to hgen.

Harbored-mod is a fork of harbored written by Brian Schott and Ferdinand Majerech aka Kiith-Sa.

The current developer and maintainer of hgen is Eugene 'Vindex' Stulin <[email protected]>.

This program is distributed under the Boost Software License.

Authors:
  • Brian Schott
  • Ferdinand Majerech
  • Eugene Stulin
Dependencies:
libdparse
Versions:
0.6.2 2026-Feb-28
0.6.1 2026-Feb-28
0.6.0 2026-Feb-28
0.5.5 2025-Feb-27
0.5.4 2025-Jan-04
Show all 11 versions
Download Stats:
  • 0 downloads today

  • 6 downloads this week

  • 6 downloads this month

  • 33 downloads total

Score:
0.1
Short URL:
hgen.dub.pm