<%- title %>
<% if (typeof post !== 'undefined') {
// just one post on this page
%>
<%=
post.author + ' - ' +
post.date.toUTCString().replace(/ GMT$/, '') + ' - '
%><%= post.category %>
<%- post.content %>
Please post feedback and comments on
the Node.JS
user mailing list.
<%
if (post.next || post.prev) {
if (post.prev) {
%>
← <%=
post.prev.title
%>
<%
}
if (post.next) {
%>
<%=
post.next.title
%> →
<%
}
}
} else { // not single post page
if (paginated && total > 1 ) {
if (page > 0) {
// add 1 to all of the displayed numbers, because
// humans are not zero-indexed like they ought to be.
%>
← Page <%- page %>
<%
}
if (page < total - 1) { %>
Page <%- page + 2 %> →
<%
}
}
posts.forEach(function(post) {
%>
<%=
post.author + ' - ' +
post.date.toUTCString().replace(/ GMT$/, '') + ' - '
%><%= post.category %>
<%- post.content %>
<%
});
if (paginated && total > 1 ) {
if (page > 0) {
// add 1 to all of the displayed numbers, because
// humans are not zero-indexed like they ought to be.
%>
← Page <%- page %>
<%
}
if (page < total - 1) { %>
Page <%- page + 2 %> →
<%
}
} // pagination
} // not a single post
%>