|
| 1 | +<head> |
| 2 | + <!-- so meta --> |
| 3 | + <meta charset="utf-8"> |
| 4 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 5 | + <meta name="HandheldFriendly" content="True"> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5" /> |
| 7 | + <%- open_graph({ |
| 8 | + image: thumbnail(page), |
| 9 | + fb_app_id: theme.open_graph.fb_app_id, |
| 10 | + fb_admins: theme.open_graph.fb_admins, |
| 11 | + twitter_id: theme.open_graph.twitter_id, |
| 12 | + google_plus: theme.open_graph.google_plus, |
| 13 | + }) %> |
| 14 | + <%- meta(page) %> |
| 15 | + <% if (theme.favicon) { %> |
| 16 | + <% if (theme.favicon.desktop) { %> |
| 17 | + <% if (theme.gravatar && (theme.gravatar.email || theme.gravatar.hash) && theme.favicon.desktop.gravatar) { %> |
| 18 | + <% if (theme.gravatar.email) { %> |
| 19 | + <link rel="shortcut icon" href="<%= gravatar(theme.gravatar.email, 48) %>"> |
| 20 | + <% } else { %> |
| 21 | + <link rel="shortcut icon" href="https://www.gravatar.com/avatar/<%= theme.gravatar.hash %>?s=48"> |
| 22 | + <% } %> |
| 23 | + <% } else { %> |
| 24 | + <link rel="shortcut icon" href="<%= url_for(theme.favicon.desktop.url) %>"> |
| 25 | + <% } %> |
| 26 | + <% } %> |
| 27 | + <% if (theme.favicon.android) { %> |
| 28 | + <% if (theme.gravatar && (theme.gravatar.email || theme.gravatar.hash) && theme.favicon.android.gravatar) { %> |
| 29 | + <% if (theme.gravatar.email) { %> |
| 30 | + <link rel="icon" type="image/png" href="<%= gravatar(theme.gravatar.email, 192) %>" sizes="192x192"> |
| 31 | + <% } else { %> |
| 32 | + <link rel="icon" type="image/png" href="https://www.gravatar.com/avatar/<%= theme.gravatar.hash %>?s=192"> |
| 33 | + <% } %> |
| 34 | + <% } else { %> |
| 35 | + <link rel="icon" type="image/png" href="<%= url_for(theme.favicon.android.url) %>" sizes="192x192"> |
| 36 | + <% } %> |
| 37 | + <% } %> |
| 38 | + <% if (theme.favicon.apple) { %> |
| 39 | + <% if (theme.gravatar && (theme.gravatar.email || theme.gravatar.hash) && theme.favicon.apple.gravatar) { %> |
| 40 | + <% if (theme.gravatar.email) { %> |
| 41 | + <link rel="apple-touch-icon" sizes="180x180" href="<%= gravatar(theme.gravatar.email, 180) %>"> |
| 42 | + <% } else { %> |
| 43 | + <link rel="apple-touch-icon" size="180x180" href="https://www.gravatar.com/avatar/<%= theme.gravatar.hash %>?s=180"> |
| 44 | + <% } %> |
| 45 | + <% } else { %> |
| 46 | + <link rel="apple-touch-icon" sizes="180x180" href="<%= url_for(theme.favicon.apple.url) %>"> |
| 47 | + <% } %> |
| 48 | + <% } %> |
| 49 | + <% } %> |
| 50 | + <!-- title --> |
| 51 | + <title><%= page_title() %></title> |
| 52 | + <!-- async scripts --> |
| 53 | + <%- partial('./google_analytics.ejs') %> |
| 54 | + <%- partial('./umami_analytics.ejs') %> |
| 55 | + <!-- styles --> |
| 56 | + <%- css('css/style') %> |
| 57 | + <!-- persian styles --> |
| 58 | + <% if (theme.direction && theme.direction === 'rtl') { %> |
| 59 | + <%- css('css/rtl') %> |
| 60 | + <% } %> |
| 61 | + <!-- rss --> |
| 62 | + <% if (theme.rss === '' && config.feed && config.feed.path) { %> |
| 63 | + <% theme.rss = config.feed.path %> |
| 64 | + <% } %> |
| 65 | + <% if (theme.rss) { %> |
| 66 | + <link rel="alternate" href="<%= url_for(theme.rss) %>" title="<%= config.title %>" type="application/atom+xml" /> |
| 67 | + <% } %> |
| 68 | + <!-- mathjax --> |
| 69 | + <% if (theme.mathjax.enabled) {%> |
| 70 | + <script type="text/x-mathjax-config"> |
| 71 | + MathJax.Hub.Config({ |
| 72 | + tex2jax: { |
| 73 | + skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'], |
| 74 | + inlineMath: [['$','$']] |
| 75 | + } |
| 76 | + }); |
| 77 | + </script> |
| 78 | + <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-MML-AM_CHTML' async></script> |
| 79 | + <% } %> |
| 80 | +</head> |
0 commit comments