]> juplo.de Git - maven-thymeleaf-skin/commitdiff
Added a parameter "flat" to generate all links as canonical links
authorKai Moritz <kai@juplo.de>
Sat, 25 Oct 2025 07:46:33 +0000 (09:46 +0200)
committerKai Moritz <kai@juplo.de>
Sat, 25 Oct 2025 08:46:45 +0000 (10:46 +0200)
src/main/resources/META-INF/maven/site.vm
src/site/xhtml/usage.xhtml

index b4866d19b697e780d6076895e186a16719d32227..46d0a3a38dafbd1261a61fbe7952a637caae252c 100644 (file)
   #set ( $canonicalPath = "" )
   <!-- WARNING: configuration parameter "path" is not set -->
 #end
-#set ( $sitePath = $pathPrefix + $canonicalPath + $project.version + "/" )
+#if ( $decoration.custom.getChild( 'thymeproxy' ).getChild( 'flat' ).getValue() )
+  <!-- Generating a flat link-structure (the configuration properties "path" and "prefix" are ignored -->
+  #set ( $sitePath = $canonicalPath )
+#else
+  #set ( $sitePath = $pathPrefix + $canonicalPath + $project.version + "/" )
+#end
 #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
 #set ( $command = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'command' ).getValue() )
 #if ( !$command )
index 48d4a82a25cfa44995def65e1818b4fa688382e7..0a208f1f76cfc5364ae9509a56611b4160fe2638 100644 (file)
@@ -27,6 +27,7 @@
   <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>
   </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>