head.ejs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <%- partial('google-analytics') %>
  6. <%
  7. var title = page.title;
  8. if (is_archive()){
  9. title = __('archive_a');
  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 = __('category') + ': ' + page.category;
  17. } else if (is_tag()){
  18. title = __('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({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %>
  24. <% if (theme.rss){ %>
  25. <link rel="alternate" href="<%= url_for(theme.rss) %>" title="<%= config.title %>" type="application/atom+xml">
  26. <% } %>
  27. <% if (theme.favicon){ %>
  28. <link rel="icon" href="<%- theme.favicon %>">
  29. <% } %>
  30. <% if (config.highlight.enable){ %>
  31. <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  32. <% } %>
  33. <%- css('css/style') %>
  34. </head>