Made the thymeleaf-command that decorates the template configurable
authorKai Moritz <kai@juplo.de>
Sun, 28 Feb 2021 21:04:07 +0000 (22:04 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 28 Feb 2021 21:04:07 +0000 (22:04 +0100)
src/main/resources/META-INF/maven/site.vm
src/site/site.xml

index 3e84b93..39f55ec 100644 (file)
 #end
 #set ( $sitePath = $canonicalPath + $project.version + "/" )
 #set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
+#set ( $command = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'command' ).getValue() )
 
 <!-- name: $pages.get($alignedFileName).name -->
 <!-- title: $title -->
 
 
 <!--*/-->
-<html
-    xmlns="http://www.w3.org/1999/xhtml"
-    th:replace="~{/templates/layout.html :: layout(
-      uri='$sitePath$alignedFileName',
-      title=~{:: title},
-      maincontent=~{:: .maincontent},
-      json='MERGE:' + ~{:: pre[class='json']/text()})}" >
+<html xmlns="http://www.w3.org/1999/xhtml" $command>
   <head>
     <title class="title">$title</title>
     <meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
index 8295a60..51950a0 100644 (file)
@@ -25,6 +25,7 @@
     <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>