-% NITDOC(1)
-
# NAME
-Generates HTML pages of API documentation from Nit source files.
+nitdoc - generates HTML pages of API documentation from Nit source files.
-# SYNOPSYS
+# SYNOPSIS
-nitdoc [*options*]...
+nitdoc [*options*]... FILE...
-# OPTIONS
+# DESCRIPTION
+
+`nitdoc` takes one or more modules and generate HTML pages of API documentation for these modules and their imported modules.
+
+The documentation is extracted from the comments found above the definition of modules, classes, and properties.
+
+Internally, `nitdoc` relies on the presence of the `dot` command from the [graphviz] project.
+If the dot program is not present or not found, no image of hierarchies are generated.
+See option `--no-dot`.
-`-W`, `--warn`
-: Show more warnings
+The documentation of the Nit [standard library] is generated with this tool.
-`-w`, `--warning`
-: Show/hide a specific warning
+ [graphviz]: http://www.graphviz.org
+ [standard library]: http://nitlanguage.org/doc/stdlib
-`-q`, `--quiet`
-: Do not show warnings
+# DOCUMENTATION FORMAT
-`--stop-on-first-error`
-: Stop on first error
+The format of the documentation is a dialect of [markdown] that allows GitHub fences (`~~~`).
+
+Code blocks are interpreted as snippets of Nit programs and intended to be used as examples of code.
+When these code snippets are valid, executable and contain at least and `assert` clause, they could be automatically executed and verified.
+See `nitunit(1)` for details.
+
+ [markdown]: http://daringfireball.net/projects/markdown
+
+# OPTIONS
-`--no-color`
-: Do not use color to display errors and warnings
+### `-d`, `--dir`
+output directory.
-`--log`
-: Generate various log files
+Where the HTML files are generated.
-`--log-dir`
-: Directory where to generate log files
+By default, the directory is named `doc`.
-`-h`, `-?`, `--help`
-: Show Help (This screen)
+### `--source`
+Format to link source code.
-`--version`
-: Show version and exit
+The format string is used to generated links to some parts of the source-code.
+Use `%f` for filename, `%l` for first line, and `%L` for last line.
-`--set-dummy-tool`
-: Set toolname and version to DUMMY. Useful for testing
+For instance, the [standard library] use the following value to link to files in GitHub:
-`-v`, `--verbose`
-: Verbose
+ "https://github.com/privat/nit/blob/$(git rev-parse HEAD)/%f#L%l-%L"
-`--bash-completion`
-: Generate bash_completion file for this program
+Here, the `git rev-parse HEAD` is used to link to the current snapshot revision of the file.
-`--stub-man`
-: Generate a stub manpage in pandoc markdown format
+### `--no-attribute`
+Ignore the attributes.
-`--disable-phase`
-: DEBUG: Disable a specific phase; use `list` to get the list.
+Note: In Nit, attributes are private. Therefore, this option is only useful
+when combined with `--private`.
-`-I`, `--path`
-: Set include path for loaders (may be used more than once)
+### `--no-dot`
+do not generate graphs with graphviz.
-`--only-parse`
-: Only proceed to parse step of loaders
+### `--private`
+also generate private API.
-`--only-metamodel`
-: Stop after meta-model processing
+## CUSTOMIZATION
-`--ignore-visibility`
-: Do not check, and produce errors, on visibility issues.
+### `--sharedir`
+directory containing nitdoc assets.
-`-d`, `--dir`
-: output directory
+By default `$NIT_DIR/share/nitdoc/` is used.
-`--source`
-: link for source (%f for filename, %l for first line, %L for last line)
+### `--shareurl`
+use shareurl instead of copy shared files.
-`--sharedir`
-: directory containing nitdoc assets
+By default, assets from the sharedir a copied into the output directory and referred with a relative path in the generated files.
+With this option, the assets are not copied and the given URL of path is used in the generated files to locate assets.
-`--shareurl`
-: use shareurl instead of copy shared files
+### `--custom-title`
+custom title for homepage.
-`--no-dot`
-: do not generate graphes with graphviz
+### `--custom-footer-text`
+custom footer text.
-`--private`
-: also generate private API
+### `--custom-overview-text`
+custom intro text for homepage
-`--custom-title`
-: custom title for homepage
+### `--custom-brand`
+custom link to external site
-`--custom-footer-text`
-: custom footer text
+## SERVICES
-`--custom-overview-text`
-: custom intro text for homepage
+### `--github-upstream`
+Git branch where edited commits will be pulled into (ex: user:repo:branch)
-`--custom-brand`
-: custom link to external site
+### `--github-base-sha1`
+Git sha1 of base commit used to create pull request
-`--github-upstream`
-: Git branch where edited commits will be pulled into (ex: user:repo:branch)
+### `--github-gitdir`
+Git working directory used to resolve path name (ex: /home/me/myproject/)
-`--github-base-sha1`
-: Git sha1 of base commit used to create pull request
+### `--piwik-tracker`
+Piwik tracker URL (ex: `"nitlanguage.org/piwik/"`)
-`--github-gitdir`
-: Git working directory used to resolve path name (ex: /home/me/myproject/)
+### `--piwik-site-id`
+Piwik site ID
-`--piwik-tracker`
-: Piwik tracker URL (ex: nitlanguage.org/piwik/)
+## TESTING
-`--piwik-site-id`
-: Piwik site ID
+### `--test`
+Only print the pages structure. Nothing is generated.
# SEE ALSO