Home

Anonymous

Doxia :: Include Macro ( Maven Site Plugin )

Include Macro for Maven2 :: Doxia starts where the standard Snippet macro ends. It combines features like standard file/snippet inclusion, source code highlighting, Velocity templates and dynamic content, without adding additional dependencies like custom site skins or template modifications.

At a glance Include Macro allows to:

  • Include verbatim and non-verbatim content in the same way as the snippet macro does.
  • Highlight code and render it to pure HTML (no client-side JavaScript is required)
  • Include dynamic content by the use of:
    • Velocity templates combined with properties
    • Custom classes (Java code) that either directly returns the content to include or acts as a properties source for templates

Syntax Highlighting:

Behind the scenes, syntax highlighting is implemented using Alex Gorbatchev's excellent syntax highlighter (http://alexgorbatchev.com/SyntaxHighlighter/) running
directly on Rhino. Choosing this wide-spread highlighter ensures excellent support for highlighting schemes and finally it produces professional results. Version 3.x has everything that is required for static processing: CommonJS support, In place code selection, no Flash or JS dependencies at runtime.

Bundled highlighting schemes (brushes) include support for: Java, JavaFX, JavaScript, JSP, Groovy, GSP, XHTML, SQL, Bash, Batch, Flex/AS3 and much more.
Custom schemes can be added via "META-INF/services" using org.tinyjee.maven.dim.sh.BrushResolver, see documentation for more details.

Click here to see Examples