Directives allow you to define pluggable bits of functionality for your fandocs. See the bundled IncludeDirective for an example.


Fandoc admonitions are little undocumented feature whereby if you prefix a paragraph with a word ending in a colon : that word becomes a css class name for the resulting html.

NOTE: This is an admonition

is rendered as

<p class="NOTE">This is an admonition</p>

FandocViewer extends admonitions to give you Directives.


Directives are defined as index properties in the following format:

"afFandocViewer.directive.{directive}" : "{qname}"

Where {directive} is the lowercase directive name and {qname} is the qualified type name of the directive subclass.

Directive names in the fandoc are case insensitive. Either of the following will invoke the IncludeDirective.

INCLUDE: wotever.html

IncLudE: wotever.html

If a directive is not found, then behaviour defaults back to the standard admonition.

Note all directive subclasses need a public no-args ctor as per sys::Type.make.

@since 1.0.4



abstract Void invoke(WebOutStream out, Uri? fandocUri, Str text)