Added hiding of blog posts

This commit is contained in:
Tim Stallard 2016-11-04 22:39:28 +00:00
parent c3cfb353f3
commit ad29ab9fe5

View File

@ -7,13 +7,15 @@ referencesOthers: true
--- ---
<% var posts = getCollection("posts").toJSON() %> <% var posts = getCollection("posts").toJSON() %>
<% posts.forEach(function(post){ %> <% posts.forEach(function(post){ %>
<div class="post"> <% if(!post.hidden){ %>
<h2 class="title"><a href="<%- post.url %>"><%= post.title %></a></h2> <div class="post">
<h3 class="subtitle"><%- post.subtitle %></h3> <h2 class="title"><a href="<%- post.url %>"><%= post.title %></a></h2>
<h4 class="date"><%- post.formattedDate %></h4> <h3 class="subtitle"><%- post.subtitle %></h3>
<div class="firstcontent blogpost"> <h4 class="date"><%- post.formattedDate %></h4>
<%- post.contentRenderedWithoutLayouts.split("-split-")[0] %> <div class="firstcontent blogpost">
<%- post.contentRenderedWithoutLayouts.split("-split-")[0] %>
</div>
<a class="morelink" href="<%- post.url %>">Read More...</a>
</div> </div>
<a class="morelink" href="<%- post.url %>">Read More...</a> <% } %>
</div>
<% }) %> <% }) %>