Build a beautiful and simple website in literally minutes. Demo at http://deanattali.com/beautiful-jekyll
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
3.9 KiB

9 years ago
9 years ago
9 years ago
8 years ago
9 years ago
8 years ago
8 years ago
8 years ago
  1. <head>
  2. <meta charset="utf-8" />
  3. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  4. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  5. <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
  6. <meta name="author" content="{{ site.author.name }}" />
  7. {% if page.subtitle %}
  8. <meta name="description" content="{{ page.subtitle }}">
  9. {% endif %}
  10. <link rel="alternate" type="application/rss+xml" title="{{ site.title }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />
  11. {% if layout.common-ext-css %}
  12. {% for css in layout.common-ext-css %}
  13. <link rel="stylesheet" href="{{ css }}" />
  14. {% endfor %}
  15. {% endif %}
  16. {% if layout.common-css %}
  17. {% for css in layout.common-css %}
  18. <link rel="stylesheet" href="{{ css | prepend: site.baseurl | replace: '//', '/' }}" />
  19. {% endfor %}
  20. {% endif %}
  21. {% if layout.common-googlefonts %}
  22. {% for font in layout.common-googlefonts %}
  23. <link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
  24. {% endfor %}
  25. {% endif %}
  26. {% if page.ext-css %}
  27. {% for css in page.ext-css %}
  28. <link rel="stylesheet" href="{{ css }}" />
  29. {% endfor %}
  30. {% endif %}
  31. {% if page.css %}
  32. {% for css in page.css %}
  33. <link rel="stylesheet" href="{{ css | prepend: site.baseurl | replace: '//', '/' }}" />
  34. {% endfor %}
  35. {% endif %}
  36. {% if page.googlefonts %}
  37. {% for font in page.googlefonts %}
  38. <link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
  39. {% endfor %}
  40. {% endif %}
  41. <!-- Facebook OpenGraph tags -->
  42. {% if site.fb_app_id %}
  43. <meta property="fb:app_id" content="{{ site.fb_app_id }}" />
  44. {% endif %}
  45. {% if page.meta-title %}
  46. <meta property="og:title" content="{{ page.meta-title }}" />
  47. {% elsif page.title %}
  48. <meta property="og:title" content="{{ page.title }}" />
  49. {% else %}
  50. <meta property="og:title" content="{{ site.title }}" />
  51. {% endif %}
  52. {% if page.meta-description %}
  53. <meta property="og:description" content="{{ page.meta-description }}">
  54. {% elsif page.subtitle %}
  55. <meta property="og:description" content="{{ page.subtitle }}">
  56. {% else %}
  57. <meta property="og:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
  58. {% endif %}
  59. <meta property="og:type" content="website" />
  60. {% if page.id %}
  61. <meta property="og:url" content="{{ site.url }}{{ page.url }}" />
  62. <link rel="canonical" href="{{ site.url }}{{ page.url }}" />
  63. {% else %}
  64. <meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
  65. <link rel="canonical" href="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
  66. {% endif %}
  67. {% if page.share-img %}
  68. <meta property="og:image" content="{{ page.share-img }}" />
  69. {% elsif site.avatar %}
  70. <meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
  71. {% endif %}
  72. <!-- Twitter summary cards -->
  73. <meta name="twitter:card" content="summary" />
  74. <meta name="twitter:site" content="@{{ site.author.twitter }}" />
  75. <meta name="twitter:creator" content="@{{ site.author.twitter }}" />
  76. {% if page.meta-title %}
  77. <meta name="twitter:title" content="{{ page.meta-title }}" />
  78. {% elsif page.title %}
  79. <meta name="twitter:title" content="{{ page.title }}" />
  80. {% else %}
  81. <meta name="twitter:title" content="{{ site.title }}" />
  82. {% endif %}
  83. {% if page.meta-description %}
  84. <meta name="twitter:description" content="{{ page.meta-description }}">
  85. {% elsif page.subtitle %}
  86. <meta name="twitter:description" content="{{ page.subtitle }}">
  87. {% else %}
  88. <meta name="twitter:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
  89. {% endif %}
  90. {% if page.share-img %}
  91. <meta name="twitter:image" content="{{ page.share-img }}" />
  92. {% elsif site.avatar %}
  93. <meta name="twitter:image" content="{{ site.url }}{{ site.avatar }}" />
  94. {% endif %}
  95. </head>