<% var sections = page.body ? page.body : theme.layout.article.body; %> <% sections.forEach(function(widget_id){ %> <% if (widget_id == 'article') { %>
<%- partial('meta', {post: post, position: 'header'}) %>
<% post.photos.forEach(function(photo){ %> <% }) %> <%- post.content %> <% if(theme.footer_post && page.layout == 'post'){ %>
<%- markdown(theme.footer_post) %> <% } %>
<% if(post.layout == 'post'){ %>
<%- partial('meta', {post: post, position: 'footer'}) %> <% } %> <% if(post.prev || post.next){ %>
<% if(post.prev){ %>
 <%- __('post.prev_page') %>

<% if (post.prev.tags && post.prev.tags.length && post.prev.tags.each) { %> <% var items = []; post.prev.tags.each(function(item){ items.push(' ' + item.name + ''); }); %>
<%- items.join(' ') %>
<% } %>
<% } %> <% if(post.next){ %>
<%} %>
<%} %>
<% } else if (widget_id == 'comments') { %> <%- partial('../_third-party/comments') %> <% } else { %> <% theme.widget.forEach(function(widget){ %> <% if (widget.id == widget_id){ %> <%- partial('../_widget/' + widget.class, {item: widget}) %> <% } %> <% }) %> <% } %> <% }) %> <% if (sections.indexOf('comments') < 0) { page.comments = false; } %> <% if (page.mathjax){ %> <%- partial('mathjax') %> <% } %> <% if (page.layout == 'post'){ %> <% } %>