Sentry Maven Skin 6.6.01
-
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=1|toDepth=2|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 Wed Jan 28 12:12:18 UTC 2026} -->
Useful for showing when documentation was generated.
Velocity Variables
Doxia processes Velocity variables. Common ones:
| Variable | Description |
|---|---|
${project.name} |
Project name from pom.xml |
${project.version} |
Project version |
${project.url} |
Project URL |
See Maven Properties[2] for custom properties.
HTML in Markdown
You can embed HTML directly in Markdown:
<div class="alert alert-info">
<strong>Note:</strong> This is an info alert using Bootstrap.
</div>
Bootstrap Alerts
<div class="alert alert-success">Success message</div>
<div class="alert alert-info">Info message</div>
<div class="alert alert-warning">Warning message</div>
<div class="alert alert-danger">Danger message</div>
Comments
Add comments that won't appear in output:
<!-- This is a comment and won't be rendered -->
Special Characters
Escape special Markdown characters:
| Character | Escape |
|---|---|
* |
\* |
_ |
\_ |
# |
\# |
[ |
\[ |
] |
\] |
Links
Internal Links
Link to other pages in your site:
[Configuration](settings.html)
[Code Section](code.html#syntax-highlighting)
External Links
[Maven](https://maven.apache.org)
External links automatically open in new tabs.
Anchor Links
Link within the same page:
[Jump to section](#section-heading)
Definition Lists
Use HTML for definition lists:
<dl>
<dt>Term 1</dt>
<dd>Definition of term 1</dd>
<dt>Term 2</dt>
<dd>Definition of term 2</dd>
</dl>
Keyboard Shortcuts
Display keyboard shortcuts:
Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy.
Press Ctrl+C to copy.
Reference
- Maven Doxia Macros[3] - Official documentation
- Doxia Markdown[4] - Markdown module
- Maven Site Plugin[5] - Site generation
Next Steps
- Page Structure[6] - How to structure pages
- Maven Properties[2] - Use pom.xml values
- Code Highlighting[7] - Format code blocks
