<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>{{{pagetitle}}} • {{#site}}{{title}}{{/site}}</title>

{{#has_favicons}}
<!-- favicons -->
<link rel="icon" type="image/png" sizes="16x16" href="{{#site}}{{root}}{{/site}}favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{#site}}{{root}}{{/site}}favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="{{#site}}{{root}}{{/site}}apple-touch-icon.png" />
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="{{#site}}{{root}}{{/site}}apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="{{#site}}{{root}}{{/site}}apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="{{#site}}{{root}}{{/site}}apple-touch-icon-60x60.png" />
{{/has_favicons}}

{{#lightswitch}}<script src="{{#site}}{{root}}{{/site}}lightswitch.js"></script>{{/lightswitch}}
{{#uses_katex}}<script src="{{#site}}{{root}}{{/site}}katex-auto.js"></script>{{/uses_katex}}

{{{headdeps}}}
{{#includes}}{{{head}}}{{/includes}}

<!-- pkgdown -->
<script src="{{#site}}{{root}}{{/site}}pkgdown.js"></script>

{{#extra}}
  {{#css}}<link href="{{#site}}{{root}}{{/site}}extra.css" rel="stylesheet">{{/css}}
  {{#js}}<script src="{{#site}}{{root}}{{/site}}extra.js"></script>{{/js}}
{{/extra}}

<meta property="og:title" content="{{{pagetitle}}}" />
{{#opengraph}}
{{#description}}
  <meta name="description" content="{{.}}" />
  <meta property="og:description" content="{{.}}" />
{{/description}}
{{#image}}
  <meta property="og:image" content="{{{src}}}" />
  {{#alt}}<meta property="og:image:alt" content="{{{.}}}" />{{/alt}}
{{/image}}
{{#twitter}}
  {{#card}}<meta name="twitter:card" content="{{{.}}}" />{{/card}}
  {{#creator}}<meta name="twitter:creator" content="{{{.}}}" />{{/creator}}
  {{#site}}<meta name="twitter:site" content="{{{.}}}" />{{/site}}
{{/twitter}}
{{/opengraph}}

{{#yaml}}{{#noindex}}<meta name="robots" content="noindex" />{{/noindex}}{{/yaml}}
{{#development}}{{#in_dev}}<meta name="robots" content="noindex">{{/in_dev}}{{/development}}

{{#yaml}}{{#google_site_verification}}
<meta name="google-site-verification" content="{{{.}}}" />
{{/google_site_verification}}{{/yaml}}

{{#yaml}}{{#ganalytics}}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{.}}"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', '{{.}}');
</script>
{{/ganalytics}}{{/yaml}}
{{#has_trailingslash}}
<!-- See https://stackoverflow.com/questions/1865837/whats-the-difference-between-window-location-and-window-location-replace — we use .replace() because we don't want the old url to appear in the browser history. -->
<script>
  if (!/(\/|html?)$/.test(window.location.href)){
    window.location.replace(window.location.href + '/');
  }
</script>
{{/has_trailingslash}}
{{#has_deps}}
<!-- dependencies from examples -->
{{{dependencies}}}
{{/has_deps}}
