From b1aa2a4a83055ff2fcaf2ceeac47a1b32d9e55fc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 8 Jul 2016 11:23:26 +0200 Subject: [PATCH] Relative URI's and breadcrumb-paths can be converted into absolute ones Defined custom variables custom.path and custom.crumbs in site.xml, that can be used to convert the relative URI's and breadcrumb-paths into absolute ones. --- src/main/resources/META-INF/maven/site.vm | 14 +++++++++++--- src/site/site.xml | 6 ++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index 6a5b765..01e16bf 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.vm @@ -89,10 +89,18 @@ #end #end +## Custom Variablen einlesen +#set ( $sitePath = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'path' ).getValue() ) +#if ( !$sitePath ) + #set ( $sitePath = "" ) +#end +#set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() ) + + @@ -100,15 +108,15 @@ xmlns="http://www.w3.org/1999/xhtml" xmlns:layout="http://www.thymeleaf.org" layout:decorator="templates/layout" - th:with="uri='$alignedFileName'" + th:with="uri='$sitePath$alignedFileName'" > juplo - $title - + -
+

$shortTitle

$bodyContent
diff --git a/src/site/site.xml b/src/site/site.xml index d2c542c..4ac76eb 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -21,4 +21,10 @@ + + + /maven-thymeleaf-skin/ + {"uri":"/projects.html","name":"Projects"},{"uri":"/maven-thymeleaf-skin/index.html","name":"Apache-Maven Thymeleaf-Skin"} + + -- 2.20.1