Quick Start

Get your documentation site up and running in 5 minutes.

Prerequisites

  • A Maven project[1] with pom.xml
  • Maven 3.x installed
  • Java 8 or later

Step 1: Project Structure

Create this directory structure:

my-project/
├── pom.xml
└── src/
    └── site/
        ├── site.xml
        ├── markdown/
        │   └── index.md
        └── resources/
            ├── css/
            │   └── site.css (optional)
            └── images/
                └── logo.png (optional)

Step 2: Configure pom.xml

Add the Maven Site Plugin with the required dependency:

<build>
  <plugins>
    <plugin>
      <artifactId>maven-site-plugin</artifactId>
      <version>4.0.0-M16</version>
      <dependencies>
        <dependency>
          <groupId>org.sentrysoftware.maven</groupId>
          <artifactId>maven-skin-tools</artifactId>
          <version>1.7.00</version>
        </dependency>
      </dependencies>
    </plugin>
  </plugins>
</build>
Note

This skin supports both maven-site-plugin 4.x and 3.x.

Step 3: Configure site.xml

Create src/site/site.xml:

Maven Site Plugin 4.x

Maven Site Plugin 4.x

<site xmlns="http://maven.apache.org/SITE/2.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 https://maven.apache.org/xsd/site-2.0.0.xsd"
    name="${project.name}">

  <skin>
    <groupId>org.sentrysoftware.maven</groupId>
    <artifactId>sentry-maven-skin</artifactId>
    <version>7.0.00</version>
  </skin>

  <bannerLeft name="${project.organization.name}" href="${project.organization.url}">
    <image src="images/logo.png" alt="${project.organization.name}"/>
  </bannerLeft>

  <custom>
    <!-- Skin settings (see https://sentrysoftware.org/sentry-maven-skin/settings.html) -->
    <keywords>maven, documentation</keywords>
  </custom>

  <body>
    <menu name="Documentation">
      <item name="Overview" href="index.html"/>
    </menu>
  </body>

</site>
Maven Site Plugin 3.x

Maven Site Plugin 3.x

<project name="${project.name}">

  <skin>
    <groupId>org.sentrysoftware.maven</groupId>
    <artifactId>sentry-maven-skin</artifactId>
    <version>7.0.00</version>
  </skin>

  <bannerLeft>
    <name>${project.organization.name}</name>
    <href>${project.organization.url}</href>
    <src>images/logo.png</src>
    <alt>${project.organization.name}</alt>
  </bannerLeft>

  <custom>
    <!-- Skin settings (see https://sentrysoftware.org/sentry-maven-skin/settings.html) -->
    <keywords>maven, documentation</keywords>
  </custom>

  <body>
    <menu name="Documentation">
      <item name="Overview" href="index.html"/>
    </menu>
  </body>

</project>
Tip

See Configuration Reference[2] for all available <custom> settings.

Step 4: Write Your First Page

Create src/site/markdown/index.md:

# Welcome

This is my documentation built with **Sentry Maven Skin**.

## Features

- Easy to write in Markdown
- Beautiful output
- Full-text search included

Step 5: Build and Preview

Generate your site:

mvn clean site

The site is generated in target/site/. Open target/site/index.html in your browser.

Live Preview

For real-time preview while editing:

mvn site:run

Then open http://localhost:8080[3]. Changes to Markdown files are reflected immediately.

Note

Changes to site.xml or pom.xml require restarting mvn site:run.

Next Steps

Now that your site is running, continue with:

Setup

Writing

Reference

Searching...
No results.