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.

head.html 2.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <head>
  2. <meta charset="utf-8">
  3. <title>{{ .Title }}</title>
  4. {{ "<!-- mobile responsive meta -->" | safeHTML }}
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}">
  7. {{ with site.Params.author }}
  8. <meta name="author" content="{{ . }}">{{ end }}
  9. {{ hugo.Generator }}
  10. {{ $url := site.Params.staticAddress }}
  11. {{ template "_internal/opengraph.html" . }}
  12. <meta name="og:image" content="{{ with .Params.image }}{{$url}}{{ . | absURL }}{{ else }}{{$url}}{{ `images/Cover.jpg` | absURL}}{{end}}">
  13. <meta name="twitter:card" content="summary_large_image"/>
  14. <meta name="twitter:title" content="{{ .Title }}"/>
  15. <meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}"/>
  16. <meta name="twitter:image" content="{{ with .Params.image }}{{$url}}{{ . | absURL}}{{ else }}{{$url}}{{ `images/Cover.jpg` | absURL}}{{end}}">
  17. <meta property="twitter:site" content="{{site.Params.twitterSite}}" />
  18. <meta property="twitter:creator" content="{{site.Params.twitterSite}}" />
  19. <link rel="canonical" href="{{ .Permalink }}">
  20. {{ "<!-- plugins -->" | safeHTML }}
  21. {{ range site.Params.plugins.css }}
  22. <link rel="stylesheet" href="{{ .link | absURL }}">
  23. {{ end }}
  24. {{"<!-- Main Stylesheet -->"|safeHTML}}
  25. {{ $styles := resources.Get "css/style.css" | minify }}
  26. <link rel="stylesheet" href="{{ $styles.Permalink }}" media="screen">
  27. {{"<!-- Custom stylesheet - for your changes -->" |safeHTML}}
  28. {{ $custom := resources.Get "css/custom.css" | minify }}
  29. <link rel="stylesheet" href="{{ $custom.Permalink }}" media="screen">
  30. {{ "<!--Favicon-->" | safeHTML }}
  31. <link rel="shortcut icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">
  32. <link rel="icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">
  33. {{ with site.Params.google_analytics_id }}
  34. {{ "<!-- Global Site Tag (gtag.js) - Google Analytics -->" | safeHTML }}
  35. <script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
  36. <script>
  37. window.dataLayer = window.dataLayer || [];
  38. function gtag(){dataLayer.push(arguments);}
  39. gtag('js', new Date());
  40. gtag('config', '{{ . }}');
  41. </script>
  42. {{ end }}
  43. </head>