From ef613e7ef748a9815b93520d505a8f31a9dbaee6 Mon Sep 17 00:00:00 2001
From: Kai Moritz
Date: Fri, 8 Jul 2016 10:10:23 +0200
Subject: [PATCH] Rendering page-data as JSON
* The JSON-data is now generated from the read in page-data.
* The data is passed to the thymeleaf-dialect "juplo:variables".
* The old breadcrumb-macro was removed.
---
src/main/resources/META-INF/maven/site.vm | 59 ++---------------------
1 file changed, 3 insertions(+), 56 deletions(-)
diff --git a/src/main/resources/META-INF/maven/site.vm b/src/main/resources/META-INF/maven/site.vm
index 2577a89..b441f02 100644
--- a/src/main/resources/META-INF/maven/site.vm
+++ b/src/main/resources/META-INF/maven/site.vm
@@ -48,7 +48,6 @@
#end
#set ( $sinkhole = $pages.put($page.uri, $page) )
- #set ( $sinkhole = $page.remove("uri") )
#else
@@ -71,53 +70,12 @@
#end
#end
-
-
-
-
-#set ( $crumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
-#macro ( searchBreadcrumbTrail $items )
- #set ( $sep = '' )
- #foreach ( $item in $items )
- #set ( $currentItemHref = $PathTool.calculateLink( $item.href, $relativePath ) )
- #set ( $currentItemHref = $currentItemHref.replaceAll( '\\', '/' ) )
- #if ( $currentItemHref == 'index.html' )
- #set ( $name = $project.name )
- #else
- #set ( $name = $item.name )
- #end
- $sep"$currentItemHref": {
- "name": "$name"
- #if ( !$item.items.empty )
- ,"childs": {
- #set ( $sinkhole = $crumbs.put( $currentItemHref , $name) )
- #searchBreadcrumbTrail ( $item.items )
- #set ( $sinkhole = $crumbs.pop() )
- }
- #end
- #if ( !$breadcrumbs && $alignedFileName == $currentItemHref )
- #set ( $breadcrumbs = $project.getClass().forName('java.util.LinkedHashMap').newInstance() )
- ## Den Titel der Seite korrigieren!
- #set ( $title = "$project.name - $item.name" )
- #set ( $shortTitle = $name )
- #set ( $sinkhole = $breadcrumbs.put( 'index.html', $project.name) )
- #set ( $sepc = '' )
- #foreach ( $crumb in $crumbs.entrySet() )
- #set ( $sinkhole = $breadcrumbs.put( $crumb.key , $crumb.value ) )
- $sepc{ "uri": "$crumb.key", "name": "$crumb.value" }
- #set( $sepc = ',' )
- #end
- #set ( $sinkhole = $breadcrumbs.put( $alignedFileName , $shortTitle) )
- ]
- #end
- }
- #set ( $sep =',' )
- #end
-#end
+
+
-
+
$bodyContent
--
2.20.1