{% assign cache_bust = site.time|date:'?v=%s' %}

<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <!-- Google Tag Manager -->
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  })(window,document,'script','dataLayer','GTM-5VSZM5J');</script>
  <!-- End Google Tag Manager -->
  {% assign desc = description | default: site.description | strip_html | strip_newlines | truncate: 160 -%}
  {% unless desc and desc != '' -%}
    {% assign error = page.url | append: ' must have a description specified!' -%}
    {{ error | throwError }}
  {% endunless %}
  <meta name="description" content="{{desc}}">
  <title>{% if short-title %}{{short-title}}{% else %}{{title}}{% endif %} | {{site.title}}</title>

  {% if canonical -%}
    <link rel="canonical" href="{{canonical}}" />
  {% endif -%}

  {% if noindex -%}
    <meta name="robots" content="noindex">
  {% endif -%}

  <!-- Favicon / Touch Icons -->
  <link rel="icon" sizes="64x64" href="/assets/img/logo/dart-64.png" eleventy:ignore>
  <link href="/assets/img/touch-icon-iphone.png" rel="apple-touch-icon" eleventy:ignore>
  <link href="/assets/img/touch-icon-ipad.png" rel="apple-touch-icon" sizes="152x152" eleventy:ignore>
  <link href="/assets/img/touch-icon-iphone-retina.png" rel="apple-touch-icon" sizes="180x180" eleventy:ignore>
  <link href="/assets/img/touch-icon-ipad-retina.png" rel="apple-touch-icon" sizes="167x167" eleventy:ignore>

  <!-- Twitter Card -->
  <meta name="twitter:card" content="summary">
  <meta name="twitter:site" content="@dart_lang">
  <meta name="twitter:title" content="{{title}}">
  <meta name="twitter:description" content="{{desc}}">

  <!-- Open Graph -->
  <meta property="og:title" content="{{title}}">
  <meta property="og:description" content="{{desc}}">
  <meta property="og:url" content="{{ page.url }}">

  {% assign og_image_path = page.og_image | default: '/assets/img/logo/dart-logo-for-shares.png' -%}
  {% assign og_type = page.og_type -%}

  {% comment %} Add page URL to page relative paths {% endcomment -%}
  {% assign og_image_start = og_image_path | slice: 0 -%}
  {% unless og_image_start == '/' %}{% capture og_image_path %}{{page.url}}/{{og_image_path}}{% endcapture %}{% endunless -%}

  <meta property="og:image" content="{{og_image_path | url}}{{site.og_image_vers}}" eleventy:ignore>

  {% if og_type -%}
    <meta property="og:type" content="{{og_type}}">
  {% endif -%}

  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Google+Sans:wght@400;500;700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Google+Sans+Display:wght@400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Google+Sans+Mono:wght@400;500;700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Google+Sans+Text:wght@400;500;700&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet" />

  <link rel="stylesheet" href="{{ '/assets/css/main.css' | append: cache_bust }}">
  {% if css -%}
  {% for cssFile in css -%}
    <link href="{{cssFile}}" rel="stylesheet" type="text/css">
  {% endfor -%}
  {% endif -%}

  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.7.0/jquery.min.js"
          integrity="sha512-3gJwYpMe3QewGELv8k/BX9vcqhryRdzRMxVfq6ngyWXwo03GFEzjsUm8Q7RZcHPHksttq7/GFoxjCVUjkjvPdw=="
          crossorigin="anonymous"
          referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/4.6.2/js/bootstrap.min.js"
          integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+"
          crossorigin="anonymous"
          referrerpolicy="no-referrer"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/js-cookie/3.0.5/js.cookie.min.js"
          integrity="sha512-nlp9/l96/EpjYBx7EP7pGASVXNe80hGhYAUrjeXnu/fyF5Py0/RXav4BBNs7n5Hx1WFhOEOWSAVjGeC3oKxDVQ=="
          crossorigin="anonymous"
          referrerpolicy="no-referrer"></script>
  
  <script src="{{ '/assets/js/os-tabs.js' | append: cache_bust }}"></script>
  <script src="{{ '/assets/js/utilities.js' | append: cache_bust }}"></script>
  <script src="{{ '/assets/js/main.js' | append: cache_bust }}"></script>

  {% if js -%}
  {% for jsFile in js -%}
    <script {% if jsFile.defer %}defer{% endif %} src="{{jsFile.url | default: jsFile}}"></script>
  {% endfor -%}
  {% endif -%}

  {% render 'analytics.html' -%}
 </head>
