<% var sections = page.body ? page.body : theme.layout.on_page.body; %> <% sections.forEach(function(widget_id){ %> <% if (widget_id == 'article') { %>
<%- partial('meta', {post: post, position: 'header'}) %>
<% (post.photos||[]).forEach(function(photo){ %>
<% }) %> <%- post.content %> <% if ((page.meta && page.meta.article_footer && page.meta.article_footer.length > 0) || (theme.layout.on_post.article_footer && (page.layout == 'post'))) { %> <% } %>
<% if(post.layout == 'post' || post.layout == 'page'){ %> <%- partial('meta', {post: post, position: 'footer'}) %> <% } %> <% if(post.prev || post.next){ %> <%} %>
<% } else if (widget_id == 'comments') { %> <%- partial('../_third-party/comments') %> <% } else { %> <%- partial('../_widget/load', {widgets: [widget_id], where: 'body'}) %> <% } %> <% }) %> <% if (sections.indexOf('comments') < 0) { page.comments = false; } %> <% if (page.mathjax){ %> <%- partial('../_third-party/mathjax') %> <% } %>