head.ejs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <head>
  2. <meta charset="utf-8">
  3. <%- partial('google-analytics') %>
  4. <%
  5. var title = page.title;
  6. if (is_archive()){
  7. title = __('archive_a');
  8. if (is_month()){
  9. title += ': ' + page.year + '/' + page.month;
  10. } else if (is_year()){
  11. title += ': ' + page.year;
  12. }
  13. } else if (is_category()){
  14. title = __('category') + ': ' + page.category;
  15. } else if (is_tag()){
  16. title = __('tag') + ': ' + page.tag;
  17. }
  18. %>
  19. <title><% if (title){ %><%= title %> | <% } %><%= config.title %></title>
  20. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  21. <%- open_graph({twitter_id: theme.twitter, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
  22. <% if (config.feed) { %>
  23. <%- feed_tag() %>
  24. <% } else if (theme.rss) { %>
  25. <%- feed_tag(theme.rss) %>
  26. <% } %>
  27. <% if (theme.favicon){ %>
  28. <%- favicon_tag(theme.favicon) %>
  29. <% } %>
  30. <% if (config.highlight.enable){ %>
  31. <%- css('https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css') %>
  32. <% } %>
  33. <%- css('css/style') %>
  34. <% if (theme.fancybox){ %>
  35. <%- css('fancybox/jquery.fancybox.min.css') %>
  36. <% } %>
  37. </head>