head.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <head>
  2. <meta charset="utf-8">
  3. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  5. {{ hugo.Generator }}
  6. <link rel="canonical" href="{{ .Permalink }}" />
  7. {{ if .IsHome }}
  8. {{ with .Site.Params.homeMetaContent }}
  9. <meta name="description" content="{{ . | plainify }}">
  10. {{ end }}
  11. {{ else }}
  12. {{ $summary := trim (.Summary | plainify | htmlUnescape) "\n\r"
  13. | default .Title }}
  14. <meta name="description" content="{{ $summary }}">
  15. {{ end }}
  16. <link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | absURL }}">
  17. <link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | absURL }}">
  18. <link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | absURL }}">
  19. <link rel="manifest" href="{{ "site.webmanifest" | absURL }}">
  20. <link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | absURL }}" color="#000000">
  21. <meta name="msapplication-TileColor" content="#ffffff">
  22. <meta name="theme-color" content="#ffffff">
  23. <style>
  24. body {
  25. visibility: hidden;
  26. opacity: 0;
  27. }
  28. </style>
  29. <style id="darkTheme">
  30. .intro-and-nav,
  31. .main-and-footer {
  32. filter: invert(100%);
  33. }
  34. * {
  35. background-color: inherit
  36. }
  37. img:not([src*=".svg"]),
  38. .colors,
  39. iframe,
  40. .demo-container {
  41. filter: invert(100%);
  42. }
  43. </style>
  44. <link rel="stylesheet" href="{{ "css/prism.css" | relURL }}" media="none" onload="this.media='all';">
  45. {{ $templateStyles := resources.Get "css/template-styles.css" }}
  46. {{ $styles := $templateStyles | resources.ExecuteAsTemplate "css/styles.css" . }}
  47. <link rel="stylesheet" type="text/css" href="{{ $styles.RelPermalink }}">
  48. {{ range .Site.Params.customCss }}
  49. <link rel="stylesheet" href="{{ . | relURL }}">
  50. {{ end }}
  51. {{ $title := print .Title " | " .Site.Title }}
  52. {{ if .IsHome }}
  53. {{ $title = .Site.Title }}
  54. {{ end }}
  55. <title>{{ $title }}</title>
  56. </head>