mx:Doc is Moxie's documentation generation task. It is based on Twitter Bootstrap, GoogleCode Prettify.
Directives are single-line text commands that surround a block of text and apply a rule to that text. Directives can not be combined nor can they be nested.
Directives are written as:
---DIRECTIVE---
Here is my text block.
---DIRECTIVE---
Directive | Description |
---|---|
NOMARKDOWN | Excludes text block from Markdown processing |
ESCAPE | Escapes < > & and \n characters with their HTML equivalents. |
FIXED | Escapes < > & and \n characters with their HTML equivalents and wraps the text in a <pre> block. |
Directive | Description |
---|---|
CODE | Escapes and wraps the textblock with Prettify |
CSS | Escapes and wraps the textblock with Prettify using a CSS syntax hint |
JAVA | Escapes and wraps the textblock with Prettify using a Java syntax hint |
JSON | Escapes and wraps the textblock with Prettify using a JSON syntax hint |
SQL | Escapes and wraps the textblock with Prettify using a SQL syntax hint |
WIKI | Escapes and wraps the textblock with Prettify using a WIKI syntax hint |
XML | Escapes and wraps the textblock with Prettify using an XML syntax hint |
YAML | Escapes and wraps the textblock with Prettify using a YAML syntax hint |
The wiki transform directives will interpret the enclosed text block using the Eclipse Mylyn WikiText parser for the specified syntax. This is useful, for example, for table generation since Markdown does not specify a table syntax.
Directive | Description |
---|---|
X:TWIKI | Interprets the block as TWiki markup |
X:TEXTILE | Interprets the block as Textile markup |
X:TRACWIKI | Interprets the block as TracWiki markup |
X:MEDIAWIKI | Interprets the block as MediaWiki markup |
X:CONFLUENCE | Interprets the block as Confluence markup |
Many Prettify themes are bundled in Moxie.
<mx:doc> <structure> <page name="overview" src="index.mkd" /> <menu name="tasks"> <page name="mx:Init" src="mxinit.mkd" /> <page name="mx:Extract" src="mxextract.mkd" /> <page name="mx:GitId" src="mxgitid.mkd" /> <page name="mx:GhPages" src="mxghpages.mkd" /> <divider /> <page name="mx:Jar" src="mxjar.mkd" /> <page name="mx:Doc" src="mxdoc.mkd" /> </menu> <page name="design" src="design.mkd" /> <page name="maxml" src="maxml.mkd" /> <page name="releases" src="releases.mkd" /> <menu name="download"> <link name="moxie-core" src="moxie-core.jar" /> <link name="moxie-all" src="moxie-all.jar" /> </menu> <report name="reports" /> <link name="GitHub" src="https://github.com/gitblit-org/moxie" /> <divider /> </structure> <substitute token="%VERSION%" value="${max-version}" /> <nomarkdown startToken="%BEGINJSON%" endToken="%ENDJSON%" prettify="true" lang="lang-json" /> <nomarkdown startToken="%BEGINXML%" endToken="%ENDXML%" prettify="true" lang="lang-xml" /> <regex searchPattern="\b(issue)(\s*[#]?|-){0,1}(\d+)\b" replacePattern="<a href='http://code.google.com/p/gitblit/issues/detail?id=$3'>issue $3</a>" /> <resource> <fileset dir="${basedir}" includes="*.jar" /> </resource> </mx:doc>