<% if (!page.prev) { %>
<% site.posts.sort(page.sort ? page.sort : "-date").each(function(post){ %>
<% if (post.group && post.group == page.group) { %>
<% if (post.top) { %>
<%- partial('_partial/post', {post: post, index: false}) %>
<% } %>
<% } %>
<% }) %>
<% } %>
<% site.posts.sort(page.sort ? page.sort : "-date").each(function(post){ %>
<% if (post.group && post.group == page.group) { %>
<% if (!post.top) { %>
<%- partial('_partial/post', {post: post, index: false}) %>
<% } %>
<% } %>
<% }) %>
<% if (page && page.posts) { %>
<%
var need_mathjax = false;
page.posts.each(function(post){
if (post.mathjax){
if (post.mathjax != "internal") {
need_mathjax = true;
}
}
});
%>
<% if (need_mathjax){ %>
<%- partial('mathjax') %>
<% } %>
<% } %>
<% } %>