Writing documentation
Factor handbook > Developer tools > Help system

Prev:Browsing documentation
Next:Help lint tool


By convention, documentation is written in files whose names end with -docs.factor. Vocabulary documentation should be placed in the same directory as the vocabulary source code; see Vocabulary loader.

A pair of parsing words are used to define free-standing articles and to associate documentation with words:
ARTICLE:

HELP:


A parsing word defines the main help article for a vocabulary:
ABOUT:


The content in both cases is a markup element, a recursive structure taking one of the following forms:
a string,
an array of markup elements,
or an array of the form { $directive content... }, where $directive is a markup word whose name starts with $, and content... is a series of markup elements

Here is a more formal schema for the help markup language:
<element> ::== <string> | <simple-element> | <fancy-element> <simple-element> ::== { <element>* } <fancy-element> ::== { <type> <element> }

Element types
Printing markup elements

Related words can be cross-referenced:
related-words ( seq -- )


See also
Help lint tool