Skip to content

Commit

Permalink
Fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
Riduidel committed Apr 20, 2020
1 parent 1583a5b commit fb47ad1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
4 changes: 1 addition & 3 deletions my-lifestream/src/main/jbake/templates/index.ftl
Expand Up @@ -7,9 +7,7 @@
</div>
<#list posts as post>
<#if (post.status == "published")>
<a href="${post.uri}"><h1><#escape x as x?xml>${post.title}</#escape></h1></a>
<p>${post.date?string("dd MMMM yyyy")}</p>
<p>${post.body}</p>
<#include "post-content.ftl" >
</#if>
</#list>

Expand Down
22 changes: 22 additions & 0 deletions my-lifestream/src/main/jbake/templates/post-content.ftl
@@ -0,0 +1,22 @@
<div style="${post.style}">

<div class="page-header">
<#if (post.title)??>
<a href="${post.uri}"><h1><#escape x as x?xml>${post.title}</#escape></h1></a>
<#else></#if>

<p><em>${post.date?string("dd MMMM yyyy")}</em></p>

<p class="tags">
<#list post.tags?sort as tag>
<#list tags?filter(t -> t.name==tag) as matching>
<a class="tag" href="${content.rootpath}${matching.uri}">${matching.name}</a></#list>
</#list>
</p>
</div>

<div class="content">${post.body}</div>

<hr />

</div>
13 changes: 2 additions & 11 deletions my-lifestream/src/main/jbake/templates/post.ftl
Expand Up @@ -2,16 +2,7 @@

<#include "menu.ftl">

<#if (content.title)??>
<div class="page-header">
<h1><#escape x as x?xml>${content.title}</#escape></h1>
</div>
<#else></#if>

<p><em>${content.date?string("dd MMMM yyyy")}</em></p>

<p>${content.body}</p>

<hr />
<#assign post=content >
<#include "post-content.ftl" >

<#include "footer.ftl">

0 comments on commit fb47ad1

Please sign in to comment.