<% var sections = page.body ? page.body : theme.layout.article.body; %> <% if (sections.indexOf('article') > -1) { %>
<%- partial('meta', {post: post, position: 'header'}) %>
<%- post.content %>
<% if(theme.footer_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){ %>
<%} %>
<%} %>
<% } %> <% if (sections.indexOf('category') > -1 || sections.indexOf('tagcloud') > -1 || sections.indexOf('related_posts') > -1) { %> <% sections.forEach(function(sectionName){ %> <% if (['category', 'tagcloud', 'related_posts'].indexOf(sectionName) > -1) { %> <% theme.sidebar.forEach(function(item){ %> <% if (item.widget == sectionName) { %> <%- partial('../_widget/' + item.widget, {item: item}) %> <% } %> <% }) %> <% } %> <% }) %> <% } %> <% if (sections.indexOf('comments') > -1) { %> <%- partial('../_third-party/comments') %> <% } %> <% if (sections.indexOf('comments') < 0) { page.comments = false; } %> <% if (page.mathjax){ %> <%- partial('mathjax') %> <% } %> <% if (page.layout == 'post'){ %> <% } %>