<%
var layout = page.layout
page.title = page.title || __(`${ layout }.title`)
page.subtitle = page.subtitle || page.title || __(`${ layout }.subtitle`)
page.banner_img = page.banner_img || theme.page.banner_img
page.banner_img_height = page.banner_img_height || theme.page.banner_img_height
page.banner_mask_alpha = page.banner_mask_alpha || theme.page.banner_mask_alpha
%>

<article class="page-content">
  <%- page.content %>

  <%- inject_point('pageComments') %>
</article>

<% if (/<[^>]+? class="[^"]*?markdown-body[^"]*?"/gims.test(page.content)) { %>
  <% import_css(theme.static_prefix.github_markdown, 'github-markdown.min.css') %>
  <% import_css(theme.static_prefix.hint, 'hint.min.css') %>

  <% if (theme.code.highlight.enable) { %>
    <%- partial('_partials/plugins/highlight.ejs') %>
  <% } %>
  <% if ((theme.code.language.enable && theme.code.language.default) || theme.code.copy_btn) { %>
    <%- partial('_partials/plugins/code-widget.ejs') %>
  <% } %>
  <% if (theme.fun_features.anchorjs.enable && page.anchorjs !== false) { %>
    <%- partial('_partials/plugins/anchorjs.ejs') %>
  <% } %>
  <% if (theme.post.image_zoom.enable && page.image_zoom !== false) { %>
    <%- partial('_partials/plugins/fancybox.ejs') %>
  <% } %>
  <% if (theme.post.image_caption.enable) { %>
    <% import_script('<script>Fluid.plugins.imageCaption();</script>') %>
  <% } %>
  <% if (theme.post.math.enable && (!theme.post.math.specific || (theme.post.math.specific && page.math))) { %>
    <%- partial('_partials/plugins/math.ejs') %>
  <% } %>
  <% if (theme.post.mermaid.enable && (!theme.post.mermaid.specific || (theme.post.mermaid.specific && page.mermaid))) { %>
    <%- partial('_partials/plugins/mermaid.ejs') %>
  <% } %>
<% } %>
<script src="https://cdn.bootcss.com/canvas-nest.js/1.0.1/canvas-nest.js"></script>