- Erstelle nach dem Abschluss einer Aufgabe jeweils einen Commit — direkt, ohne vorher nachzufragen.
- Fasse in der Commit-Nachricht zusammen, was und warum geändert wurde.
+## Maven-Site-Dokumentation
+
+Die Projektdokumentation liegt unter `src/site/` und wird mit `mvn site` gerendert.
+Diese CLAUDE.md ist die **Single Source of Truth (SSOT)** für den inhaltlichen Teil der Dokumentation.
+Die Markdown-Dateien unter `src/site/markdown/` sind aus dieser CLAUDE.md abgeleitet und werden
+**manuell auf Anforderung** neu generiert — nicht automatisch vor jedem Release.
+
+### Struktur
+
+```
+src/site/
+ site.xml ← Navigation, Skin (maven-fluido-skin), Menüname
+ markdown/
+ index.md ← Übersicht: Name, Ziel, Quick Start, Community-Prinzip
+ architecture.md ← Technisches: site.vm, stili-json-Format, Seitentypen, Body-Extraktion
+ import-in-hugo.md ← Referenz: Hugo-Import-Skript
+ import-in-astro.md ← Referenz: Astro-Import-Skript
+```
+
+**Mapping CLAUDE.md → Dokumentation:**
+
+| CLAUDE.md-Abschnitt | Datei |
+|---|---|
+| Was ist StILi? + Architektur-Prinzip | `index.md` |
+| Funktionsweise: site.vm + JSON-Struktur + Seitentypen + Extraktion | `architecture.md` |
+| Import-Skripte → import-in-hugo.sh | `import-in-hugo.md` |
+| Import-Skripte → import-in-astro.sh | `import-in-astro.md` |
+
+### Wann neu generieren?
+
+Nur bei **inhaltlichen Änderungen** an den folgenden CLAUDE.md-Abschnitten:
+
+- „Was ist StILi?" oder „Architektur-Prinzip"
+- „Funktionsweise: site.vm" oder „JSON-Struktur" oder „Seitentypen" oder „Extraktion"
+- „Import-Skripte" (Parameter, Ausgaben, Beispiele)
+
+Nicht neu generieren für: Arbeitsregeln, Commit-Anweisungen, reine Formulierungsänderungen ohne Informationsgewinn.
+
+### Wie neu generieren (Aufruf für Claude Code)
+
+**Trigger:** `"Bitte generiere die Maven-Site-Dokumentation neu"` oder sinngemäß.
+
+**Vorgehen:**
+1. Lies die inhaltlich relevanten Abschnitte dieser CLAUDE.md
+2. Überarbeite **nur** die betroffenen Stellen in den entsprechenden Markdown-Dateien (Mapping siehe oben)
+3. Halte Formatierung, Überschriften-Hierarchie und Tabellenstruktur stabil — ändere nur was sich inhaltlich geändert hat
+4. Committe die aktualisierten Dateien
+
+**Prinzip für minimale Diffs:** Jeder inhaltliche Unterschied zur CLAUDE.md erzeugt genau einen entsprechenden Diff in der Dokumentation — kein Rauschen durch Umformatierung, Neustrukturierung oder Neusortierung.
+
---
## Was ist StILi?
<configuration>
<siteDirectory>${project.build.directory}/filtered-site</siteDirectory>
</configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.doxia</groupId>
+ <artifactId>doxia-module-markdown</artifactId>
+ <version>1.9.1</version>
+ </dependency>
+ </dependencies>
</plugin>
</plugins>
</build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
- <version>2.9</version>
+ <version>3.7.0</version>
<configuration>
<linkOnly>true</linkOnly>
</configuration>
+ <reportSets>
+ <reportSet>
+ <reports>
+ <report>index</report>
+ <report>summary</report>
+ <report>licenses</report>
+ <report>team</report>
+ <report>scm</report>
+ <report>dependency-info</report>
+ <report>plugins</report>
+ </reports>
+ </reportSet>
+ </reportSets>
</plugin>
</plugins>
</reporting>
--- /dev/null
+# Architecture
+
+## How `site.vm` Works
+
+The Velocity template `src/main/resources/META-INF/maven/site.vm` is the core of StILi. It renders every Maven page in the following structure:
+
+```html
+<h1 id="stili-title">Page Title</h1>
+<div id="stili-body">
+ $bodyContent
+</div>
+```
+
+**For `index.html` only**, a JSON metadata block is appended after the body:
+
+```html
+<script id="stili-json" type="application/json">
+{
+ "project": "Project Name",
+ "groupId": "de.juplo",
+ "artifactId": "my-project",
+ "version": "1.0.0",
+ "pages": [ ... ]
+}
+</script>
+```
+
+This block is the machine-readable interface between StILi and the import scripts. It appears only in `index.html` so that the import scripts have a single, predictable location for the full site metadata.
+
+## The `stili-json` Format
+
+The top-level fields mirror the Maven project coordinates:
+
+| Field | Source |
+|---|---|
+| `project` | Display name from POM `<name>` |
+| `groupId` | POM `<groupId>` |
+| `artifactId` | POM `<artifactId>` |
+| `version` | POM `<version>` |
+| `generator` | Maven Doxia Site Renderer version |
+| `generated` | ISO-8601 timestamp of generation |
+| `pages` | Array of all pages (see below) |
+
+### The `pages` Array
+
+The `pages` array contains every page of the Maven site in the order they appear in the configured navigation menu. Array position serves as the `weight` for navigation sorting in the target system.
+
+Each entry:
+
+```json
+{
+ "name": "Project Reports",
+ "href": "project-reports.html",
+ "childs": ["plugin-info.html"],
+ "crumbs": [],
+ "path": ""
+}
+```
+
+| Field | Meaning |
+|---|---|
+| `name` | Display name of the page |
+| `href` | Filename relative to the site root (e.g. `project-reports.html`; for generated directories e.g. `apidocs/index.html`) |
+| `childs` | Direct children in the menu tree (their `href` values) |
+| `crumbs` | Ancestor pages from the root, excluding `index.html` (e.g. `["project-reports.html"]`) |
+| `path` | Ancestors as a directory path — `crumbs` with `.html` replaced by `/` (e.g. `"project-reports/"`) |
+
+## Page Types
+
+| Type | Example | Detection |
+|---|---|---|
+| Root | `index.html` | `href == "index.html"` |
+| Section node (has children) | `project-reports.html` | `childs.length > 0` |
+| Leaf page | `configuration.html` | `childs.length == 0` |
+| Generated content | `apidocs/`, `xref/` etc. | Subdirectory, not an HTML file |
+
+Generated content (JavaDocs, cross-references, etc.) appears as a subdirectory in the Maven site output and has a `pages` entry with an `href` like `apidocs/index.html`.
+
+## Body Extraction
+
+Import scripts extract the page body from each HTML file using this pattern:
+
+```bash
+sed -n '/<script id="stili-json" type="application\/json">/q;p' "$SOURCE" \
+ | tail -n +2
+```
+
+- `sed` outputs all lines before the JSON block (and stops). For non-`index.html` files there is no JSON block, so all content is output.
+- `tail -n +2` drops the first line (`<h1 id="stili-title">...</h1>`), leaving only the `<div id="stili-body">` and its content.
--- /dev/null
+# Import Script: Astro
+
+`import-in-astro.sh` imports a Maven site generated with the StILi skin into an Astro project.
+
+## Prerequisites
+
+- `bash`
+- `jq` (JSON processor)
+
+## Usage
+
+Run the script from the Maven site output directory (`target/site/`):
+
+```
+cd target/site
+./import-in-astro.sh <ASTRO_ROOT> [OPTIONS]
+```
+
+The script checks for `package.json` in `<ASTRO_ROOT>` to verify that the path points to an Astro project.
+
+## Parameters
+
+| Parameter | Description |
+|---|---|
+| `<ASTRO_ROOT>` | Path to the Astro project root (required). |
+| `--base <path>` | URL and routing path prefix. The project name is always appended; for `--archived` the version is appended as well. Default: none (project at root). |
+| `--project <name>` | Overrides the project name derived from `artifactId`. |
+| `--current [<url>]` | *(Default)* Marks this version as the current (visible) release. If `<url>` is given, it overrides the computed URL base. |
+| `--archived [<url>]` | Marks this version as archived. `params.canonical` points to the corresponding current-version page. If `<url>` is given, it overrides the computed URL base. |
+| `--canonical <url>` | Explicitly sets the canonical URL base. Only valid with `--archived`. Default: `<base>/<project>`. |
+
+Only one of `--current` and `--archived` may be specified.
+
+## What the Script Produces
+
+### Content files
+
+Each HTML page becomes a content file with YAML frontmatter at:
+
+```
+src/content/projects/<project>/<version>/<page-path>
+```
+
+Frontmatter fields: `title`, `weight`, `url`, `params.current`, and (for archived) `params.canonical`. The HTML body follows the frontmatter delimiter.
+
+Section nodes (pages with children) become `_index.html` files in a subdirectory; leaf pages keep their `.html` filename:
+
+| Maven output | Content path | URL (current, no `--base`) |
+|---|---|---|
+| `index.html` | `_index.html` | `/<project>/` |
+| `project-reports.html` (has children) | `project-reports/_index.html` | `/<project>/project-reports.html` |
+| `configuration.html` (leaf) | `configuration.html` | `/<project>/configuration.html` |
+
+URLs are always **flat** (no URL nesting matching the content hierarchy), reflecting Maven's own flat site structure.
+
+### Routing files
+
+For each content file a minimal Astro routing file is created at the path corresponding to the page URL:
+
+```
+src/pages/<base>/<project>/index.astro (current, root page)
+src/pages/<base>/<project>/configuration.html.astro (current, leaf page)
+src/pages/<base>/<project>/<version>/index.astro (archived, root page)
+```
+
+The import depth (number of `../` segments in the `ProjectPage.astro` import) is computed dynamically from the actual URL depth, so `--base` values of any nesting level are handled correctly.
+
+### Static files (generated content)
+
+Generated content directories (`apidocs/`, `xref/`, etc.) are copied to:
+
+```
+public/projects/<project>/<version>/<directory>/
+```
+
+This path is always fixed regardless of `--base`, because the generated content is served at `/projects/<project>/<version>/` independently of where the content pages appear in the URL space.
+
+Relative links inside content pages that point to generated directories (e.g. `href="apidocs/"`) are rewritten to absolute URLs with an explicit `index.html` (e.g. `href="/projects/<project>/<version>/apidocs/index.html"`). This is necessary because the same content page may be served at different URL prefixes (visible vs. archived) while the generated docs always live at the same fixed path.
+
+## Known Generated Content Directories
+
+The following directories are recognised as generated content (defined by `GENERATED_DOC_NAMES` in the consuming Astro project):
+
+| Directory | Typical content |
+|---|---|
+| `apidocs/` | JavaDocs |
+| `testapidocs/` | Test JavaDocs |
+| `xref/` | Source cross-reference |
+| `xref-test/` | Test source cross-reference |
+
+## URL Defaults
+
+| Mode | URL Base |
+|---|---|
+| `--current`, no `--base` | `/<project>/` |
+| `--current --base /path` | `/path/<project>/` |
+| `--archived`, no `--base` | `/<project>/<version>/` |
+| `--archived --base /path` | `/path/<project>/<version>/` |
+
+## Examples
+
+Import the current release directly under the site root:
+
+```
+cd target/site
+./import-in-astro.sh /path/to/astro-project
+```
+
+Import an archived version under `/projects/`:
+
+```
+cd target/site
+./import-in-astro.sh /path/to/astro-project \
+ --base /projects \
+ --archived \
+ --canonical /my-project
+```
--- /dev/null
+# Import Script: Hugo
+
+`import-in-hugo.sh` imports a Maven site generated with the StILi skin into a Hugo project.
+
+## Prerequisites
+
+- `bash`
+- `jq` (JSON processor)
+- `perl` with `HTML::Entities` module (for `<pre>` block conversion)
+
+## Usage
+
+Run the script from the Maven site output directory (`target/site/`):
+
+```
+cd target/site
+./import-in-hugo.sh <HUGO_ROOT> [OPTIONS]
+```
+
+## Parameters
+
+| Parameter | Description |
+|---|---|
+| `<HUGO_ROOT>` | Path to the Hugo project root (required). |
+| `--base <path>` | URL and content path prefix. The project name and version are always appended. Default: none (project at root). |
+| `--project <name>` | Overrides the project name derived from `artifactId`. |
+| `--current [<url>]` | *(Default)* Marks this version as the current (visible) release. If `<url>` is given, it overrides the computed URL base. |
+| `--archived [<url>]` | Marks this version as archived. `params.canonical` points to the corresponding current-version page. If `<url>` is given, it overrides the computed URL base. |
+| `--canonical <url>` | Explicitly sets the canonical URL base. Only valid with `--archived`. Default: `<base>/<project>`. |
+
+Only one of `--current` and `--archived` may be specified.
+
+## What the Script Produces
+
+### Content files
+
+Each HTML page becomes a Hugo content file at:
+
+```
+content/<base>/<project>/<version>/<page-path>
+```
+
+Content files have YAML frontmatter with `title`, `weight`, `outputs: [html]`, `url`, `layout: article`, and `params.current` / `params.canonical`.
+
+Section nodes (pages with children) become `_index.html` files in a subdirectory. Leaf pages keep their `.html` filename.
+
+### Static files
+
+Generated content directories (`apidocs/`, `xref/`, etc.) are copied to:
+
+```
+static/<url-base>/<directory>/
+```
+
+For each directory that also has a `pages` entry in `stili-json`, a redirect page is created in the content tree so that the nav link works correctly.
+
+### `<pre>` block conversion
+
+`<pre>` blocks in the HTML body are converted to Hugo `{{< highlight guess >}}` shortcodes via `perl`. This ensures syntax-highlighted rendering in Hugo.
+
+## URL Defaults
+
+| Mode | URL Base |
+|---|---|
+| `--current`, no `--base` | `/<project>/` |
+| `--current --base /path` | `/path/<project>/` |
+| `--archived`, no `--base` | `/<project>/<version>/` |
+| `--archived --base /path` | `/path/<project>/<version>/` |
+
+## Examples
+
+Import the current release directly under the site root:
+
+```
+cd target/site
+./import-in-hugo.sh /path/to/hugo-project
+```
+
+Import an archived version under `/projects/`:
+
+```
+cd target/site
+./import-in-hugo.sh /path/to/hugo-project \
+ --base /projects \
+ --archived \
+ --canonical /my-project
+```
--- /dev/null
+# ${project.name}
+
+${project.description}
+
+## What is StILi?
+
+**StILi** stands for **(St)atic (I)mport site (Li)berator** — and the name says it all:
+
+- **Liberator**: Maven generates site content as monolithic HTML pages that are only usable within the Maven theme ecosystem. StILi _liberates_ that content by serialising the page structure and metadata into a machine-readable JSON block, making it accessible to any downstream tool.
+- **Static**: The intended targets are static site generators — Hugo, Astro, and any other generator for which someone contributes an import script.
+- **Import**: The mechanism is a set of import scripts that transfer the generated Maven output into the target system.
+- **Site**: The source is Maven Doxia site output.
+
+The name also deliberately echoes the German and Italian word for *style* (*Stil* / *stile*) — a nod to the fact that StILi liberates Maven site content in a stylish way.
+
+## Quick Start
+
+Add StILi as the skin in your project's `src/site/site.xml`:
+
+```xml
+<project ...>
+ <skin>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ </skin>
+ <custom>
+ <menuName>Your Main Menu Name</menuName>
+ </custom>
+ ...
+</project>
+```
+
+The `<menuName>` custom element tells StILi which menu in `site.xml` is the primary navigation. StILi uses this to determine the page order and hierarchy recorded in the `stili-json` block.
+
+After running `mvn site`, the generated output in `target/site/` contains the regular HTML files plus the import scripts. Run the appropriate import script from that directory:
+
+```
+cd target/site
+./import-in-astro.sh /path/to/your/astro-project --base /projects --archived
+```
+
+See the [Architecture](architecture.html) page for a detailed explanation of the generated format, and the [Hugo](import-in-hugo.html) and [Astro](import-in-astro.html) pages for the full import script reference.
+
+## Design Principle: Extensible by the Community
+
+StILi is not tied to any specific website or static site generator. The skin itself is completely generator-agnostic — it only ensures that the content and navigation structure are machine-readable.
+
+Generator-specific logic lives in import scripts, which the skin ships as Maven resources and copies into the generated site output:
+
+| Script | Target |
+|---|---|
+| `import-in-hugo.sh` | Hugo |
+| `import-in-astro.sh` | Astro |
+
+Anyone who wants to use StILi with a different generator writes a new import script. Contributions are welcome.
+
+## License
+
+${project.name} is licensed under the [GNU Lesser General Public License, Version 3.0](licenses.html).
<?xml version="1.0" encoding="UTF-8"?>
<project
- xmlns="http://maven.apache.org/DECORATION/1.1.0"
- xlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://maven.apache.org/DECORATION/1.8.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
- http://maven.apache.org/DECORATION/1.1.0
- http://maven.apache.org/xsd/decoration-1.1.0.xsd
- "
- name="Apache Maven Thymeleaf-Skin"
- >
+ http://maven.apache.org/DECORATION/1.8.0
+ https://maven.apache.org/xsd/decoration-1.8.0.xsd"
+ name="${project.name}">
+
<skin>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
+ <groupId>org.apache.maven.skins</groupId>
+ <artifactId>maven-fluido-skin</artifactId>
+ <version>1.12.0</version>
</skin>
+
+ <bannerLeft>
+ <name>StILi</name>
+ <href>index.html</href>
+ </bannerLeft>
+
<body>
- <menu>
- <item name="About" href="index.html"/>
- <item name="Usage Examples" href="usage.html"/>
- <item name="Project Information" href="project-info.html"/>
+ <menu name="StILi">
+ <item name="Overview" href="index.html"/>
+ <item name="Architecture" href="architecture.html"/>
+ <item name="Import Scripts">
+ <item name="Hugo" href="import-in-hugo.html"/>
+ <item name="Astro" href="import-in-astro.html"/>
+ </item>
</menu>
<menu ref="reports"/>
</body>
+
<custom>
- <thymeproxy>
- <path>/maven-thymeleaf-skin/</path>
- <prefix>/projects</prefix>
- <crumbs>"/index.html","/projects.html"</crumbs>
- <command>th:replace="~{/templates/layout.html :: layout(uri='' + ~{:: code[class='site_uri']/text()}, title=~{:: title}, maincontent=~{:: .maincontent}, json='MERGE:' + ~{:: pre[class='json']/text()})}"</command>
- </thymeproxy>
+ <menuName>StILi</menuName>
</custom>
+
</project>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- </head>
- <body>
- <h1>${project.name}</h1>
- <h2>${project.description}</h2>
- <p>
- The Apache-Maven Thymeleaf-Skin is an Apache Maven site skin, aimed at
- giving you <strong>full freedom in styling and structuring</strong>
- your website, while using the comfortable mechanisms provided by maven
- to build the documentation of your projects.
- </p>
- <p>
- To achieve this gloal, this skin renders very plain (x)html5 pages, that
- call a thymelaf layout-template, to give you full control over the
- decoration of the pages.
- The skin compiles all available information about the pages, like the
- position of the page in the menu-structure, the according breadcrumb-path
- and configured meta-information (an additional title, image and
- alternative text for the image) of the link in the menu.
- These information is made available to the called template as a
- JSON-string.
- Your template may parse this string and use the information to render a
- custom menu and other navigation-elements like a breadcrumb-path.
- </p>
- <p>
- See the <a href="usage.html">usage-page</a> for a full explanation, on
- how to use the skin.
- </p>
- <p>
- This skin was developed as a part of the project
- <a href="http://yourshouter.com/projekte/crowdgest%C3%BCtzte-veranstaltungs-suchmaschine.html">Entwicklung einer crowdgestützten Suchmaschine für Veranstaltungs- und Locationdaten</a>,
- to ease the process of publishing the project results.
- As one of the winners of the
- <a href="http://yourshouter.com/referenzen/leitmarktwettbewerb-createmedia-nrw.html">CreateMedia.NRW</a>-contest,
- the project is promoted by the
- <a href="http://yourshouter.com/partner/mweimh-nrw.html">ministerium for economy, energy, industry, medium-sized bussinesses and handcraft for the state of North-Rhine Westphalia</a>
- in the course of the
- <a href="http://yourshouter.com/partner/efre--europ%C3%A4ischer-fonds-f%C3%BCr-regionale-entwicklung.html">OP EFRE.NRW 2014 — 2020</a>.
- </p>
- <h2>Releases</h2>
- <ul>
- <li><a href="index.html">current version</a></li>
- <li>${project.version} (this version)</li>
- </ul>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- </head>
- <body>
- <strong>There is no bug-tracking system set up for this project!</strong>
- <p>
- Please send your bug-reports, questions or feature-requests directly
- to the developer.
- </p>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- </head>
- <body>
- <strong>There are no mailinglists defined for this project!</strong>
- <p>
- Please send your bug-reports, questions or feature-requests directly
- to the developer.
- </p>
- </body>
-</html>
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- </head>
- <body>
- <h2>Activation</h2>
- <p>
- To use this skin in your project, you have to configure the skin element of
- <a href="http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/decoration.html">the site descriptor</a>
- (<code>site.xml</code>):
- </p>
- <pre><code class="xml"><project name="xxx">
- [...]
- <skin>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </skin>
- [...]
-</project>
- </code></pre>
- <h2>Configuration</h2>
- <p>
- In order to take full advantage of the generated templates, you should consider to tune the follwoing custom properties:
- </p>
- <ul>
- <li><strong>path</strong></li>
- <li><strong>prefix</strong></li>
- <li><strong>flat</strong></li>
- <li><strong>crumbs</strong></li>
- <li><strong>command</strong></li>
- </ul>
- <h3>path</h3>
- <p>The value of this configuration option is used to build the absolute path for the generated pages.</p>
- <p>The skin builds three variants of the page-uri, that are made selectable for Thymeleaf as content of the template:</p>
- <ul>
- <li>
- <strong>site_uri:</strong>
- Concatenation of the configured <code>prefix</code> and <code>path</code>, the version of the project and the relative path of the page
- </li>
- <li>
- <strong>canonical_uri:</strong>
- Concatenation of the configured <code>path</code> and the relative path of the page
- </li>
- <li>
- <strong>relative_uri:</strong>
- Solely the relative path of the page
- </li>
- </ul>
- <h3>prefix</h3>
- <p>If set, the <code>path</code> is prefixed with the value, when generating the <code>site_uri</code>.</p>
- <h3>flat</h3>
- <p>
- If set, the configuration properties <code>prefix</code> and <code>path</code> are ignored,
- when generating the <code>site_uri</code>.
- Thus, the generated <code>site_uri</code> is always equal to the generated <code>canonical_uri</code>.
- </p>
- <h3>crumbs</h3>
- <p>Some crumbs, that should be prepended to the breadcrumbs that are computed for the pages.</p>
- <p>The crumbs have to be specified in double quotes and must be separated by commas. Example:</p>
- <pre>"/index.html", "/projects.html"</pre>
- <h3>command</h3>
- <p>A Thymelaf-"Command", that will be included in the opening <code><html></code>-tag.</p>
- <p>This command can be used to decorate the template with the designe of your website. Example:</p>
- <pre>th:replace="
- ~{/templates/layout.html :: layout(
- uri='' + ~{:: code[class='site_uri']/text()},
- title=~{:: title},
- maincontent=~{:: .maincontent},
- json='MERGE:' + ~{:: pre[class='json']/text()})}"</pre>
- <p>
- This example uses a fragment-definition from a layout, that is defined
- in a template <code>/templates/layout.html</code> and supplies the uri
- of the page, that it selects from the <code>site_uri</code> and the
- title and the main content of the page.
- </p>
- <p>
- It also uses the JSON, that reflects the structure of all pages of the
- generated site, to provide the layout with additional information.
- The <code>MERGE:</code> is a feature of
- <a href="https://juplo.de/thymeproxy/">Thymeproxy</a>, that enables you
- to specify a sitemap of your website as JSON and dynamically merge
- additional elements into it, that are needed by the markup-logic of the
- layout to generate appropriate menu structures and breadcrumbs.
- </p>
- <h2>A complete example</h2>
- <p>As example, take a look at the site descriptor of this project:</p>
- <pre><code class="xml">
-<?xml version="1.0" encoding="UTF-8"?>
-<project
- xmlns="http://maven.apache.org/DECORATION/1.1.0"
- xlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://maven.apache.org/DECORATION/1.1.0
- http://maven.apache.org/xsd/decoration-1.1.0.xsd
- "
- name="Apache Maven Thymeleaf-Skin"
- >
- <skin>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <version>${project.version}</version>
- </skin>
- <body>
- <menu>
- <item name="About" href="index.html"/>
- <item name="Usage Examples" href="usage.html"/>
- <item name="Project Information" href="project-info.html"/>
- </menu>
- <menu ref="reports"/>
- </body>
- <custom>
- <thymeproxy>
- <path>/maven-thymeleaf-skin/</path>
- <crumbs>"/index.html","/projects.html"</crumbs>
- <command>th:replace="~{/templates/layout.html :: layout(uri='' + ~{:: code[class='site_uri']/text()}, title=~{:: title}, maincontent=~{:: .maincontent}, json='MERGE:' + ~{:: pre[class='json']/text()})}"</command>
- </thymeproxy>
- </custom>
-</project>
- </code></pre>
- </body>
-</html>