summaryrefslogtreecommitdiff
path: root/themes/hexo-theme-freemind.bithack/layout/_partial/head.ejs
blob: 9f0c97798cbc75948a054aaafb5286895b708427 (plain)
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
<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="pragma" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache">
  <meta http-equiv="expires" content="0">
  <%
  var title = [];
  if (page.current > 1) title.push(__('page', page.current));
  if (page.title) title.push(page.title);
  if (page.category) title.push(page.category);
  if (page.tag) title.push(page.tag);
  if (page.archive){
    if (page.year) title.push(__('archive_b', page.year + (page.month ? '/' + page.month : '')));
    else title.push(__('archive_a'));
  }
  title.push(config.title);
  %>
  <title><%= title.join(' | ') %></title>
  <% if (config.author){ %><meta name="author" content="<%= config.author %>"><% } %>
  <% if (page.description){ %>
  <meta name="description" content="<%= page.description %>">
  <% } else if (config.description){ %>
  <meta name="description" content="<%= config.description %>">
  <% } else if (page.excerpt){ %>
  <meta name="description" content="<%= strip_html(page.excerpt).replace(/^\s*/, '').replace(/\s*$/, '') %>"> 
  <% } else if (page.content){ %>
  <meta name="description" content="<%= strip_html(page.content).replace(/^\s*/, '').replace(/\s*$/, '').substring(0, 150) %>">
  <% } %>
  <% if (page.keywords){ %><meta name="keywords" content="<%= page.keywords %>"><% } %>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

  <% if (page.title){ %><meta property="og:title" content="<%= page.title %>"/><% } %>
  <meta property="og:site_name" content="<%= config.title %>"/>

  <% if(page.cover) { %>
    <meta property="og:image" content="<%= page.cover %>" />
  <% } else { %>
    <meta property="og:image" content="<%= config.cover %>"/>
  <% } %>

  <% if (theme.rss){ %>
    <link rel="alternative" href="<%- config.root %><%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml">
  <% } %>
  <% if (theme.favicon){ %>
    <link href="<%- config.root %><%- theme.favicon %>" rel="icon">
  <% } %>
  
  <link rel="stylesheet" href="<%- config.root %>css/bootstrap.min.css" media="screen" type="text/css">
  <link rel="stylesheet" href="<%- config.root %>css/font-awesome.css" media="screen" type="text/css">
  <link rel="stylesheet" href="<%- config.root %>css/style.css" media="screen" type="text/css">
  <link rel="stylesheet" href="<%- config.root %>css/responsive.css" media="screen" type="text/css">
  <link rel="stylesheet" href="<%- config.root %>css/highlight.css" media="screen" type="text/css">
  <link rel="stylesheet" href="<%- config.root %>css/google-fonts.css" media="screen" type="text/css">
  <!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->

  <script src="<%- config.root %>js/jquery-2.0.3.min.js"></script>

  <!-- analytics -->
  <%- partial('post/analytics') %>

</head>