1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9 To use this skin in your project, you have to configure the skin element of
10 <a href="http://maven.apache.org/doxia/doxia-sitetools/doxia-decoration-model/decoration.html">the site descriptor</a>
11 (<code>site.xml</code>):
13 <pre><code class="xml"><project name="xxx">
16 <groupId>${project.groupId}</groupId>
17 <artifactId>${project.artifactId}</artifactId>
18 <version>${project.version}</version>
23 <h2>Configuration</h2>
25 In order to take full advantage of the generated templates, you should consider to tune the follwoing custom properties:
28 <li><strong>path</strong></li>
29 <li><strong>crumbs</strong></li>
30 <li><strong>command</strong></li>
33 <p>The value of this configuration option is used to build the absolute path for the generated pages.</p>
34 <p>The skin builds three variants of the page-uri, that are made selectable for Thymeleaf as content of the template:</p>
37 <strong>site_uri:</strong>
38 Concatenation of the configured <code>path</code>, the version of the project and the relative path of the page
41 <strong>canonical_uri:</strong>
42 Concatenation of the configured <code>path</code> and the relative path of the page
45 <strong>relative_uri:</strong>
46 Solely the relative path of the page
50 <p>Some crumbs, that should be prepended to the breadcrumbs that are computed for the pages.</p>
51 <p>The crumbs have to be specified in double quotes and must be separated by commas. Example:</p>
52 <pre>"/index.html", "/projects.html"</pre>
54 <p>A Thymelaf-"Command", that will be included in the opening <code><html></code>-tag.</p>
55 <p>This command can be used to decorate the template with the designe of your website. Example:</p>
57 ~{/templates/layout.html :: layout(
58 uri='' + ~{:: code[class='site_uri']/text()},
60 maincontent=~{:: .maincontent},
61 json='MERGE:' + ~{:: pre[class='json']/text()})}"</pre>
63 This example uses a fragment-definition from a layout, that is defined
64 in a template <code>/templates/layout.html</code> and supplies the uri
65 of the page, that it selects from the <code>site_uri</code> and the
66 title and the main content of the page.
69 It also uses the JSON, that reflects the structure of all pages of the
70 generated site, to provide the layout with additional information.
71 The <code>MERGE:</code> is a feature of
72 <a href="https://juplo.de/thymeproxy/">Thymeproxy</a>, that enables you
73 to specify a sitemap of your website as JSON and dynamically merge
74 additional elements into it, that are needed by the markup-logic of the
75 layout to generate appropriate menu structures and breadcrumbs.
77 <h2>A complete example</h2>
78 <p>As example, take a look at the site descriptor of this project:</p>
79 <pre><code class="xml">
80 <?xml version="1.0" encoding="UTF-8"?>
82 xmlns="http://maven.apache.org/DECORATION/1.1.0"
83 xlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
85 http://maven.apache.org/DECORATION/1.1.0
86 http://maven.apache.org/xsd/decoration-1.1.0.xsd
88 name="Apache Maven Thymeleaf-Skin"
91 <groupId>${project.groupId}</groupId>
92 <artifactId>${project.artifactId}</artifactId>
93 <version>${project.version}</version>
97 <item name="About" href="index.html"/>
98 <item name="Usage Examples" href="usage.html"/>
99 <item name="Project Information" href="project-info.html"/>
101 <menu ref="reports"/>
105 <path>/maven-thymeleaf-skin/</path>
106 <crumbs>"/index.html","/projects.html"</crumbs>
107 <command>th:replace="~{/templates/layout.html :: layout(uri='' + ~{:: code[class='site_uri']/text()}, title=~{:: title}, maincontent=~{:: .maincontent}, json='MERGE:' + ~{:: pre[class='json']/text()})}"</command>