Doxia Site Tools - Site Renderer

The Site Renderer handles the rendering of sites, assembling a common site decoration with a collection of documents.

A default site decoration is included (see default-site.vm), but other decorations can be used at will, either as a standalone template or packaged in a skin artifact (containing a META-INF/maven/site.vm template).

Documents can be dynamically generated with Doxia Sink API, like Maven reports, or simply read from static files, eventually processed by Velocity if their file names end in .vm.

Doxia Site Skins

Site decoration can be customized with skins.

Maven team provides a collection of skins for projects use, but more skins are listed in MAVENUSER wiki.

Some documentation is available on how to write a new skin.

Velocity processing

Site decoration and documents with file names ending in .vm are processed by Velocity.

The Velocity context defines some variables, that you can use:

alignedFileNameStringThe file name of the (html) document being rendered, relative to the document being rendered
authorsList<String>A list of authors from the source document
decorationDecorationModelThis is a model that represents the data in your site.xml
currentDateDateThe date when the site is rendered
currentFileNameStringThe file name of the (html) document being rendered, relative to the site root
dateCreationStringThe date specified in the source document, in the format "yyyyMMdd"
dateFormatDateFormatAn instance of the date format as defined in site.xml/publishDate/@format (default: An instance of the default date format for the locale of the document being rendered
dateRevisionStringThe date when the site is rendered, in the format "yyyyMMdd"
localeLocaleThe locale for the document being rendered
publishDateDateAn optional hardcoded publish date that has been set programmatically
relativePathStringThe path to the site root from the document being rendered
shortTitleStringThe title of the document, excluding the project or site name
titleStringThe title of the document, including the project or site name

There are also some properties defined by caller:


See DefaultSiteRenderer.createVelocityContext(...) source for more details.

When doxia-site-renderer is used by maven-site-plugin, the following template properties are defined:

project propertiesStringProperties defined in POM are directly available.

See AbstractSiteRenderingMojo.createSiteRenderingContext(...) source for more details.