Welcome to mirror list, hosted at ThFree Co, Russian Federation.

head.html « partials « layouts - github.com/nanxiaobei/hugo-paper.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b2aaef6f88d712339785d033dd04111010aacdcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<head>
  <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 -->
  <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title>

  <!-- Meta -->
  {{ if eq .Kind "page" }}
  <meta name="description" content="{{ .Summary }}" />
  <meta name="author" content="{{ .Params.Author | default site.Author.name }}" />
  {{ else }}
  <meta name="description" content="{{ site.Params.description }}" />
  <meta name="author" content="{{ site.Author.name }}" />
  {{ end }}

  <!-- Styles & Scripts -->
  {{ $app_css := resources.Get "app.css" }}
  <!---->
  {{ $custom_css := resources.Get "custom.css" }}
  <!---->
  {{ $css := slice $app_css $custom_css | resources.Concat "app.css" | minify }}
  <link rel="preload stylesheet" as="style" href="{{ $css.Permalink }}" />

  {{ if and .IsPage (not site.Params.disableHLJS) }}
  <link rel="preload stylesheet" as="style" href="{{ `an-old-hope.min.css` | absURL }}" />
  <script
    defer
    src="{{ `highlight.min.js` | absURL }}"
    onload="hljs.initHighlightingOnLoad();"
  ></script>
  {{ end }}

  <!-- Preload -->
  <link rel="preload" as="image" href="{{ `theme.png` | absURL }}" />

  {{ range $.Scratch.Get "social-list" }}
  <link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}" />
  {{ end }}

  <!-- Favicon -->
  <link rel="icon" href="{{ `favicon.ico` | absURL }}" />
  <link rel="apple-touch-icon" href="{{ `apple-touch-icon.png` | absURL }}" />

  <!-- Generator -->
  {{ hugo.Generator }}

  <!-- RSS -->
  {{ range .AlternativeOutputFormats }}
  <link
    rel="{{ .Rel }}"
    type="{{ .MediaType.Type }}"
    href="{{ .Permalink }}"
    title="{{ site.Title }}"
  />
  {{ end }}

  <!-- Misc -->
  {{ if or hugo.IsProduction (eq site.Params.env "production") }}
  <!---->
  {{ template "_internal/google_analytics_async.html" . }}
  <!---->
  {{ template "_internal/google_news.html" . }}
  <!---->
  {{ template "_internal/opengraph.html" . }}
  <!---->
  {{ template "_internal/schema.html" . }}
  <!---->
  {{ template "_internal/twitter_cards.html" . }}
  <!---->
  {{ end }}
</head>