blob: b5279a0876885c1b3e6366a8db433a81fea50585 (
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
|
<!DOCTYPE html>
<html lang="{{ site.LanguageCode }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{{ with .Description }}
<meta name="description" content="{{ . }}">
{{ else }}
{{ if .IsPage }}
<meta name="description" content="{{ .Summary }}">
{{ else }}
{{ with .Site.Params.description }}
<meta name="description" content="{{ . }}">
{{ end }}
{{ end }}
{{ end }}
{{ hugo.Generator }}
{{ if site.Params.schema }}{{ template "_internal/schema.html" . }}{{ end }}
{{ if site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }}
{{ if site.Params.twittercards }}{{ template "_internal/twitter_cards.html" . }}{{ end }}
<title>
{{ if eq .Title site.Title }}
{{ site.Title }}
{{ else }}
{{ with .Title }}{{ . }} | {{ end }}{{ site.Title }}
{{ end }}
</title>
<link rel="canonical" href="{{ .Permalink }}">
{{ range .AlternativeOutputFormats }}
{{ printf "<link rel=%q type=%q href=%q title=%q>" .Rel .MediaType .Permalink site.Title | safeHTML }}
{{ end }}
{{ $basecss := resources.Get "css/base.tpl.css" | resources.ExecuteAsTemplate "css/base.css" . }}
{{ with site.Params.css }}
{{ $customcss := slice $basecss }}
{{ range . }}{{ $customcss = $customcss | append (readFile . | resources.FromString (printf "custom/%s" .)) }}{{ end }}
{{ $basecss = $customcss | resources.Concat "css/base.css" }}
{{ end }}
{{ $basecss | minify | fingerprint | .Page.Scratch.SetInMap "css" "base" }}
{{ with site.Params.js }}
{{ $customjs := slice }}
{{ range . }}{{ $customjs = $customjs | append (readFile . | resources.FromString (printf "custom/%s" .)) }}{{ end }}
{{ $customjs | resources.Concat "js/base.js" | minify | fingerprint | $.Page.Scratch.SetInMap "js" "base" }}
{{ end }}
{{/*
In the following block, Hugo is forced to stop and pre-render the
content of the current page with all its shortcodes. Thanks to this
pre-render, shortcodes can be used to load additional CSS and JS
resources to specific pages of the website.
*/}}
{{ block "loadshortcodes" . }}{{ with .Content }}{{ end }}{{ end }}
{{ range .Scratch.GetSortedMapValues "css" }}
<link rel="stylesheet" href="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
{{ end }}
{{ range .Scratch.GetSortedMapValues "js" }}
<script defer src="{{ .Permalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous"></script>
{{ end }}
</head>
<body>
{{ partialCached "banner.html" . }}
<main>
<div class="u-wrapper">
<div class="u-padding">
{{ block "main" . }}{{ end }}
</div>
</div>
</main>
{{ partialCached "footer.html" . }}
</body>
</html>
|