From: Kai Moritz Date: Sat, 25 Oct 2025 07:46:33 +0000 (+0200) Subject: Added a parameter "flat" to generate all links as canonical links X-Git-Tag: maven-thymeleaf-skin-1.1.2~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=8ad51a157348aad520bc559b0404c7e16188830a;p=maven-thymeleaf-skin Added a parameter "flat" to generate all links as canonical links --- diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm index b4866d1..46d0a3a 100644 --- a/src/main/resources/META-INF/maven/site.vm +++ b/src/main/resources/META-INF/maven/site.vm @@ -127,7 +127,12 @@ #set ( $canonicalPath = "" ) #end -#set ( $sitePath = $pathPrefix + $canonicalPath + $project.version + "/" ) +#if ( $decoration.custom.getChild( 'thymeproxy' ).getChild( 'flat' ).getValue() ) + + #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 ) diff --git a/src/site/xhtml/usage.xhtml b/src/site/xhtml/usage.xhtml index 48d4a82..0a208f1 100644 --- a/src/site/xhtml/usage.xhtml +++ b/src/site/xhtml/usage.xhtml @@ -27,6 +27,7 @@ @@ -49,6 +50,12 @@

prefix

If set, the path is prefixed with the value, when generating the site_uri.

+

flat

+

+ If set, the configuration properties prefix and path are ignored, + when generating the site_uri. + Thus, the generated site_uri is always equal to the generated canonical_uri. +

crumbs

Some crumbs, that should be prepended to the breadcrumbs that are computed for the pages.

The crumbs have to be specified in double quotes and must be separated by commas. Example: