Used by many SS13 codebases, DMDoc automatically generates code documentation from comments.

Types, macros, vars, and procs can be documented using any of the four different doc comment styles which both block and line comments are supported. Documentation blocks may target their enclosing item or the following item.

/// This comment applies to the following macro.
#define BLUE rgb(0, 255, 0)

/** Block comments work too. */
	var/affinity = BLUE  //! Enclosing comments follow their item.

	/*! Block comments work too. */

You can also link inside any doc comment or markdown file to another documented piece of code.

Valid forms of crosslinks:


You can customize the link text that appears. This is done by prepending the custom link text in brackets, such as: [some define][DEFINE_NAME].


The title of a documentation entry is determined by whichever is set first:

  • A # Title set at the top of a doc block, if present.
  • The type's name var if present and not disabled in config.
  • The last component of the typepath.


  * # Fubar

Source code for DMDoc can be found here.