head.html 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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.use-site-title %}{{ site.title }} {{ site.title-separator }} {{ site.description }}{% elsif 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.title-separator }} {{ site.description }}" href="{{ site.baseurl }}/feed.xml" />
  11. {% include gtm_head.html %}
  12. {% if layout.common-ext-css %}
  13. {% for css in layout.common-ext-css %}
  14. {% include ext-css.html css=css %}
  15. {% endfor %}
  16. {% endif %}
  17. {% if layout.common-css %}
  18. {% for css in layout.common-css %}
  19. <link rel="stylesheet" href="{{ css | prepend: site.baseurl | replace: '//', '/' }}" />
  20. {% endfor %}
  21. {% endif %}
  22. {% if layout.common-googlefonts %}
  23. {% for font in layout.common-googlefonts %}
  24. <link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
  25. {% endfor %}
  26. {% endif %}
  27. {% if page.ext-css %}
  28. {% for css in page.ext-css %}
  29. {% include ext-css.html css=css %}
  30. {% endfor %}
  31. {% endif %}
  32. {% if page.css %}
  33. {% for css in page.css %}
  34. <link rel="stylesheet" href="{{ css | prepend: site.baseurl | replace: '//', '/' }}" />
  35. {% endfor %}
  36. {% endif %}
  37. {% if page.googlefonts %}
  38. {% for font in page.googlefonts %}
  39. <link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ font }}" />
  40. {% endfor %}
  41. {% endif %}
  42. <!-- Facebook OpenGraph tags -->
  43. {% if site.fb_app_id %}
  44. <meta property="fb:app_id" content="{{ site.fb_app_id }}" />
  45. {% endif %}
  46. {% if page.meta-title %}
  47. <meta property="og:title" content="{{ page.meta-title }}" />
  48. {% elsif page.title %}
  49. <meta property="og:title" content="{{ page.title }}" />
  50. {% else %}
  51. <meta property="og:title" content="{{ site.title }}" />
  52. {% endif %}
  53. {% if page.meta-description %}
  54. <meta property="og:description" content="{{ page.meta-description }}">
  55. {% elsif page.subtitle %}
  56. <meta property="og:description" content="{{ page.subtitle }}">
  57. {% else %}
  58. <meta property="og:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
  59. {% endif %}
  60. <meta property="og:type" content="website" />
  61. {% if page.id %}
  62. <meta property="og:url" content="{{ site.url }}{{ page.url }}" />
  63. <link rel="canonical" href="{{ site.url }}{{ page.url }}" />
  64. {% else %}
  65. <meta property="og:url" content="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
  66. <link rel="canonical" href="{{ site.url }}{{ page.url | remove: '/index.html' | remove: '.html' }}" />
  67. {% endif %}
  68. {% if page.share-img %}
  69. <meta property="og:image" content="{{ page.share-img }}" />
  70. {% elsif site.avatar %}
  71. <meta property="og:image" content="{{ site.url }}{{ site.avatar }}" />
  72. {% endif %}
  73. <!-- Twitter summary cards -->
  74. <meta name="twitter:card" content="summary" />
  75. <meta name="twitter:site" content="@{{ site.author.twitter }}" />
  76. <meta name="twitter:creator" content="@{{ site.author.twitter }}" />
  77. {% if page.meta-title %}
  78. <meta name="twitter:title" content="{{ page.meta-title }}" />
  79. {% elsif page.title %}
  80. <meta name="twitter:title" content="{{ page.title }}" />
  81. {% else %}
  82. <meta name="twitter:title" content="{{ site.title }}" />
  83. {% endif %}
  84. {% if page.meta-description %}
  85. <meta name="twitter:description" content="{{ page.meta-description }}">
  86. {% elsif page.subtitle %}
  87. <meta name="twitter:description" content="{{ page.subtitle }}">
  88. {% else %}
  89. <meta name="twitter:description" content="{{ page.content | strip_html | xml_escape | truncatewords: 50 }}">
  90. {% endif %}
  91. {% if page.share-img %}
  92. <meta name="twitter:image" content="{{ page.share-img }}" />
  93. {% elsif site.avatar %}
  94. <meta name="twitter:image" content="{{ site.url }}{{ site.avatar }}" />
  95. {% endif %}
  96. {% if site.matomo %}
  97. {% include matomo.html %}
  98. {% endif %}
  99. </head>