Sentry Software
Sentry Maven Skin 7.0.00
-
Home
- Writing Documentation
Doxia Features
Maven Doxia provides powerful macros for dynamic content. This page covers the most useful ones.
Table of Contents Macro
Generate a ToC from page headings:
<!-- MACRO{toc|fromDepth=2|toDepth=3|id=toc} -->
| Parameter | Description | Default |
|---|---|---|
fromDepth |
Starting heading level | 1 |
toDepth |
Ending heading level | 2 |
id |
Must be toc for styling |
Required |
See Table of Contents[1] for details.
Snippet Macro
Include code from external files:
<!-- MACRO{snippet|id=example|file=src/main/java/Example.java} -->
Marking Snippets in Source
In your source file, mark the snippet boundaries:
public class Example {
// START SNIPPET: example
public void doSomething() {
System.out.println("Hello");
}
// END SNIPPET: example
}
Snippet Parameters
| Parameter | Description |
|---|---|
id |
Snippet identifier (matches START/END markers) |
file |
Path to source file (relative to project root) |
url |
URL to fetch snippet from |
verbatim |
If false, content is processed as markup |
Full File Include
Omit id to include the entire file:
<!-- MACRO{snippet|file=src/config/example.xml} -->
Echo Macro
Display the current date/time:
<!-- MACRO{echo|value=Today is ${currentDate}} -->
Useful for showing when documentation was generated.
Comments
Add comments that won't appear in output:
<!-- This is a comment and won't be rendered -->
Reference
- Maven Doxia Macros[2] - Official documentation
- Doxia Markdown[3] - Markdown module
- Maven Site Plugin[4] - Site generation
Next Steps
- Page Structure[5] - How to structure pages
- Maven Properties[6] - Use pom.xml values
- Code Highlighting[7] - Format code blocks
- Configuration Reference[8] - All site.xml and front matter options
Search Results for {{siteSearch | truncate:'50'}}
{{resultArray.length}}
Searching...
No results.
