1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
| <% var separator = theme.title_join_string || theme.tab_title_separator var title = page.title ? [page.title, config.title].join(separator) : config.title var keywords = page.keywords || config.keywords if (keywords instanceof Array) { keywords = keywords.join(',') } var description = page.description || page.excerpt || (is_post() && page.content) || config.description if (description) { description = strip_html(description).substring(0, 200).trim().replace(/\n/g, ' ') } var ogImage = page.og_img || page.index_img var ogConfig = Object.assign({ image: ogImage && url_for(ogImage) }, theme.open_graph) %>
<head> <meta charset="UTF-8">
<link rel="apple-touch-icon" sizes="76x76" href="<%= url_for(theme.apple_touch_icon) %>"> <link rel="icon" href="<%= url_for(theme.favicon) %>"> <% if (theme.canonical.enable) { %> <link rel="canonical" href="<%= url_join(config.url, page.canonical_path.replace('index.html', '')) %>"/> <% } %>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <% if (theme.force_https) { %> <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"> <% } %> <meta name="theme-color" content="<%= theme.color.navbar_bg_color %>"> <meta name="author" content="<%= page.author || config.author %>"> <meta name="keywords" content="<%= keywords %>"> <% if (theme.open_graph.enable) { %> <%- open_graph(ogConfig) %> <% } else { %> <meta name="description" content="<%= description %>"> <% } %> <% if ((theme.post.meta.views.enable && theme.post.meta.views.source === 'busuanzi') || (theme.footer.statistics.enable && theme.footer.statistics.source === 'busuanzi')) { %> <meta name="referrer" content="no-referrer-when-downgrade"> <% } %> <% if (theme.custom_head) { %> <%- theme.custom_head %> <% } %> <title><%= title %></title>
<%- partial('_partials/css.ejs') %> <%- export_config() %> <%- js_ex(theme.static_prefix.internal_js, 'utils.js') %> <%- js_ex(theme.static_prefix.internal_js, 'color-schema.js') %> <%- partial('_partials/plugins/analytics.ejs') %>
<%- inject_point('head') %> <% if (theme.math && theme.math.engine === 'mathjax') { %> <script> window.MathJax = { tex: { inlineMath: [['$','$'], ['\\(','\\)']], displayMath: [['$$','$$'], ['\\[','\\]']], processEscapes: true, tags: 'ams' }, options: { skipHtmlTags: ['script','noscript','style','textarea','pre','code'] }, loader: { load: ['[tex]/ams'] } }; MathJax.startup && MathJax.startup.promise.then(() => MathJax.typeset()); </script> <script src="<%= theme.math.mathjax.cdn %>" async></script> <% } %> </head>
|