projects
/
maven-thymeleaf-skin
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed possible NullPointerException during link-calculation
[maven-thymeleaf-skin]
/
src
/
main
/
resources
/
META-INF
/
maven
/
site.vm
diff --git
a/src/main/resources/META-INF/maven/site.vm
b/src/main/resources/META-INF/maven/site.vm
index
a6055e5
..
ca508d4
100644
(file)
--- a/
src/main/resources/META-INF/maven/site.vm
+++ b/
src/main/resources/META-INF/maven/site.vm
@@
-7,7
+7,11
@@
#set ( $stack = $project.getClass().forName('java.util.LinkedList').newInstance() )
#macro ( buildPages $menu )
#set ( $stack = $project.getClass().forName('java.util.LinkedList').newInstance() )
#macro ( buildPages $menu )
- #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
+ #if ( $menu.href )
+ #set ( $currentItemHref = $PathTool.calculateLink( $menu.href, $relativePath ) )
+ #else
+ #set ( $currentItemHref = '' )
+ #end
#set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
#if ($currentItemHref)
#set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
#if ($currentItemHref)
@@
-102,6
+106,7
@@
#end
#set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
#end
#set ( $siteCrumbs = $decoration.custom.getChild( 'thymeproxy' ).getChild( 'crumbs' ).getValue() )
+<!-- name: $pages.get($alignedFileName).name -->
<!-- title: $title -->
<!-- short title: $shortTitle -->
<!-- current page: $alignedFileName -->
<!-- title: $title -->
<!-- short title: $shortTitle -->
<!-- current page: $alignedFileName -->
@@
-121,7
+126,7
@@
"
>
<head>
"
>
<head>
- <title>
juplo - $title
</title>
+ <title>
#if($shortTitle and $shortTitle != '')$title#else$project.name — $pages.get($alignedFileName).name#end
</title>
<meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
<link rel="canonical" href="$sitePath$alignedFileName"/>
</head>
<meta http-equiv="Content-Type" content="text/html; charset=${outputEncoding}" />
<link rel="canonical" href="$sitePath$alignedFileName"/>
</head>
@@
-134,7
+139,6
@@
</p>
<hr />
<article class="main" layout:fragment="maincontent">
</p>
<hr />
<article class="main" layout:fragment="maincontent">
- <header><h1>$shortTitle</h1></header>
$bodyContent
</article>
<hr />
$bodyContent
</article>
<hr />