<% if((is_post() || is_page()) && theme.fun_features.anchorjs.enable){ %>
  <%- js_ex(theme.static_prefix.anchor, "/anchor.min.js") %>
  <script>
    anchors.options = {
      placement: "<%- theme.fun_features.anchorjs.placement %>",
      visible: "<%- theme.fun_features.anchorjs.visible %>",
      <% if(theme.fun_features.anchorjs.icon != ""){ %>
      icon: "<%- theme.fun_features.anchorjs.icon %>"
      <% } %>
    };
    var el = "<%- theme.fun_features.anchorjs.element || 'h1,h2,h3,h4,h5,h6' %>".split(",");
    var res = [];
    for (item of el) {
      res.push(".markdown-body > " + item)
    }
    anchors.add(res.join(", "))
  </script>
<% } %>
