head.ejs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <%
  6. function capitalize (str) { return str.charAt(0).toUpperCase() + str.substring(1).toLowerCase() }
  7. var title = page.title;
  8. if (is_archive()) {
  9. title = capitalize(__('index.archive'));
  10. if (is_month()) {
  11. title += ': ' + page.year + '/' + page.month;
  12. } else if (is_year()) {
  13. title += ': ' + page.year;
  14. }
  15. } else if (is_category()) {
  16. title = capitalize(__('index.category')) + ': ' + page.category;
  17. } else if (is_tag()) {
  18. title = capitalize(__('index.tag')) + ': ' + page.tag;
  19. }
  20. %>
  21. <title><% if (title) { %><%= title %> | <% } %><%= config.title %></title>
  22. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  23. <%- open_graph({
  24. image: thumbnail(page),
  25. fb_app_id: theme.miscellaneous.open_graph.fb_app_id,
  26. fb_admins: theme.miscellaneous.open_graph.fb_admins,
  27. twitter_id: theme.miscellaneous.open_graph.twitter_id,
  28. google_plus: theme.miscellaneous.open_graph.google_plus,
  29. }) %>
  30. <% if (theme.rss) { %>
  31. <link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml" />
  32. <% } %>
  33. <% if (theme.customize.favicon) { %>
  34. <link rel="icon" href="<%- url_for(theme.customize.favicon) %>" />
  35. <% } %>
  36. <%- css('vendor/font-awesome/css/font-awesome.min') %>
  37. <%- css('vendor/open-sans/styles') %>
  38. <%- css('vendor/source-code-pro/styles') %>
  39. <%- css('css/style') %>
  40. <%- js('vendor/jquery/2.1.3/jquery.min') %>
  41. <%- partial('plugin/scripts', { isHead: true }) %>
  42. </head>