Mar 8, 2018 3:27:42 PM seb leridon avatar   343

Generate Freemarker macro documentation


The docgenerator plugin is used to generate the technical documentation of the commons.html file, to detail the operation of Freemarker macros. The generated text is based on reading code lines and comments to analyze and integrate them into the documentation.

Plugin homepage:

Image Home


To allow the plugin to work, writing the commons.html file must respect certain writing standards.

<#-- _doc : BackGround -->
<#-- _title : pBackGround-->
<#-- _param : Bootstrap colors: primary/success/info/warning/danger -->
<#-- _param : AdminTLE colors: gray/gray-light/black/red/yellow/aqua/blue/light-blue/green/navy/teal/olive/lime/orange/fuchsia/purple/maroon -->
<#-- _html : <input type="text" value="submit"> -->
<#-- _call :<@td></@td>-->
<#-- _description : Description de la première macro  -->
<#-- autres informations supplémentaires  -->

<#macro pBackground color=''>
	<p class="bg-${color}"><#nested></p>

At each new macro of the file, a block of descriptive comments is placed above it. Each indication on the macro must be contained in a single comment.

  • _doc: group of macros
  • _title: title of the macro
  • _param: parameters (at each new parameters, make a new line)
  • _html: html code represented by the macro (it will be written in hard in the doc and interpreted next)
  • _call: macro call
  • _description: description
  • No title: additional information

The fields _doc, _description and "No title" are optional.


To start the generation of the technical documentation, just click on the button "Start generation".

Rendering generated documentation:

rendering the doc