1+ < head >
2+ < meta charset ="utf-8 " />
3+ < title >
4+ {{ if (eq .Site.Params.reversepagetitle true) }}
5+ {{ with .Title }}
6+ {{ . }} |
7+ {{ end }}
8+ {{- .Site.Params.author -}}
9+ {{ else }}
10+ {{- .Site.Params.author -}}{{ with .Title }}
11+ |
12+ {{ . }}
13+ {{ end }}
14+
15+ {{ end }}
16+
17+ </ title >
18+
19+ <!-- Meta -->
20+ {{- hugo.Generator -}}
21+ < meta name ="viewport " content ="width=device-width,initial-scale=1,viewport-fit=cover " />
22+ < meta name ="author " content ="{{ .Site.Params.author }} " />
23+ < meta
24+ name ="description "
25+ content ="{{ if .Params.description }}
26+ {{- .Params.description -}}
27+ {{ else }}
28+ {{- .Site.Params.description -}}
29+ {{ end }} "
30+ />
31+ {{ if .Params.redirectUrl }}
32+ < meta http-equiv ="refresh " content ="1; url={{ .Params.redirectUrl }} " />
33+ {{ end }}
34+ {{- if .Site.Params.googleSiteVerify }}
35+ < meta name ="google-site-verification " content ="{{ .Site.Params.googleSiteVerify }} " />
36+ {{- end -}}
37+
38+
39+ <!-- CSS -->
40+ {{ if eq .Site.Language.LanguageDirection "rtl" }}
41+ {{ $sassTemplate := resources.Get "scss/anatole.rtl.scss" }}
42+ {{ $style := $sassTemplate | resources.ExecuteAsTemplate "scss/main.rtl.scss" . | css.Sass | resources.Minify | resources.Fingerprint }}
43+ < link
44+ rel ="stylesheet "
45+ href ="{{ $style.RelPermalink }} "
46+ integrity ="{{ $style.Data.Integrity }} "
47+ crossorigin ="anonymous "
48+ type ="text/css "
49+ />
50+ {{ else }}
51+ {{ $sassTemplate := resources.Get "scss/anatole.scss" }}
52+ {{ $style := $sassTemplate | resources.ExecuteAsTemplate "scss/main.scss" . | css.Sass | resources.Minify | resources.Fingerprint }}
53+ < link
54+ rel ="stylesheet "
55+ href ="{{ $style.RelPermalink }} "
56+ integrity ="{{ $style.Data.Integrity }} "
57+ crossorigin ="anonymous "
58+ type ="text/css "
59+ />
60+ {{ end }}
61+
62+ {{ $markupHighlightStyle := resources.Get "css/markupHighlight.css" | resources.Minify | resources.Fingerprint }}
63+ < link
64+ rel ="stylesheet "
65+ href ="{{ $markupHighlightStyle.RelPermalink }} "
66+ integrity ="{{ $markupHighlightStyle.Data.Integrity }} "
67+ crossorigin ="anonymous "
68+ type ="text/css "
69+ />
70+ {{ range .Site.Params.customCss }}
71+ {{ $minstyles := resources.Get . }}
72+ {{ $styles := $minstyles | resources.Minify | resources.Fingerprint }}
73+ < link
74+ rel ="stylesheet "
75+ href ="{{ $styles.RelPermalink }} "
76+ integrity ="{{ $styles.Data.Integrity }} "
77+ crossorigin ="anonymous "
78+ media ="screen "
79+ />
80+ {{ end }}
81+ {{ $style := resources.Get "fontawesome/css/fontawesome.min.css" | resources.Fingerprint }}
82+ < link
83+ rel ="stylesheet "
84+ href ="{{ $style.RelPermalink }} "
85+ integrity ="{{ $style.Data.Integrity }} "
86+ crossorigin ="anonymous "
87+ type ="text/css "
88+ />
89+ {{ $style := resources.Get "fontawesome/css/solid.min.css" | resources.Fingerprint }}
90+ < link
91+ rel ="stylesheet "
92+ href ="{{ $style.RelPermalink }} "
93+ integrity ="{{ $style.Data.Integrity }} "
94+ crossorigin ="anonymous "
95+ type ="text/css "
96+ />
97+ {{ $style := resources.Get "fontawesome/css/regular.min.css" | resources.Fingerprint }}
98+ < link
99+ rel ="stylesheet "
100+ href ="{{ $style.RelPermalink }} "
101+ integrity ="{{ $style.Data.Integrity }} "
102+ crossorigin ="anonymous "
103+ type ="text/css "
104+ />
105+ {{ $style := resources.Get "fontawesome/css/brands.min.css" | resources.Fingerprint }}
106+ < link
107+ rel ="stylesheet "
108+ href ="{{ $style.RelPermalink }} "
109+ integrity ="{{ $style.Data.Integrity }} "
110+ crossorigin ="anonymous "
111+ type ="text/css "
112+ />
113+ {{ if .Params.redirectUrl }}
114+ {{ $style := resources.Get "css/spinner.css" | resources.Minify | resources.Fingerprint }}
115+ < link
116+ rel ="stylesheet "
117+ href ="{{ $style.RelPermalink }} "
118+ integrity ="{{ $style.Data.Integrity }} "
119+ crossorigin ="anonymous "
120+ type ="text/css "
121+ />
122+ {{- end -}}
123+ {{ if .Site.Params.googleFonts }}
124+ {{ $baseUrl := "https://fonts.googleapis.com/css2?family=" }}
125+ {{ $fontParam := delimit .Site.Params.googleFonts "&family=" }}
126+ {{ $url := printf "%s" "&display=swap" | printf "%s%s" $fontParam | printf "%s%s" $baseUrl | printf "%s" }}
127+ < link rel ="preconnect " href ="https://fonts.googleapis.com " />
128+ < link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin />
129+ < link href ="{{ $url }} " rel ="stylesheet " />
130+ {{- end -}}
131+
132+
133+ <!-- Favicons -->
134+ < link rel ="shortcut icon " href ="{{ .Site.Params.favicon | relURL }}favicon.ico " type ="image/x-icon " />
135+ < link rel ="apple-touch-icon " sizes ="180x180 " href ="{{ .Site.Params.favicon | relURL }}apple-touch-icon.png " />
136+ < link rel ="icon " type ="image/png " sizes ="32x32 " href ="{{ .Site.Params.favicon | relURL }}favicon-32x32.png " />
137+ < link rel ="icon " type ="image/png " sizes ="16x16 " href ="{{ .Site.Params.favicon | relURL }}favicon-16x16.png " />
138+
139+ < link rel ="canonical " href ="{{ .Permalink }} " />
140+
141+ <!-- RSS -->
142+ {{ with .OutputFormats.Get "rss" -}}
143+ {{ printf `< link rel ="%s " type ="%s " href ="%s " title ="%s " /> ` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
144+ {{ end -}}
145+
146+
147+ <!-- JavaScript -->
148+ {{ $anatoleHeader := resources.Get "js/anatole-header.js" }}
149+ {{ $secureHeaderJS := $anatoleHeader | resources.Minify | resources.Fingerprint }}
150+ < script
151+ type ="text/javascript "
152+ src ="{{ $secureHeaderJS.RelPermalink }} "
153+ integrity ="{{ $secureHeaderJS.Data.Integrity }} "
154+ crossorigin ="anonymous "
155+ > </ script >
156+
157+ {{ if not .Site.Params.disableThemeSwitcher }}
158+ {{ $anatoleThemeSwitcher := resources.Get "js/anatole-theme-switcher.js" }}
159+ {{ $secureThemeSwitcherJS := $anatoleThemeSwitcher | resources.Minify | resources.Fingerprint }}
160+ < script
161+ type ="text/javascript "
162+ src ="{{ $secureThemeSwitcherJS.RelPermalink }} "
163+ integrity ="{{ $secureThemeSwitcherJS.Data.Integrity }} "
164+ crossorigin ="anonymous "
165+ > </ script >
166+ {{ end }}
167+
168+ {{- $js := "" -}}
169+ {{- range .Site.Params.customJs -}}
170+ {{- if or (in . "http://") (in . "https://") -}}
171+ < script src ="{{ . | relURL }} "> </ script >
172+ {{- else -}}
173+ {{- $customJS := resources.Get . -}}
174+ {{- if $customJS -}}
175+ {{- if eq $js "" -}}
176+ {{- $js = $customJS -}}
177+ {{- else -}}
178+ {{- $js = slice $js $customJS | resources.Concat "js/custom.js" -}}
179+ {{- end -}}
180+
181+ {{- end -}}
182+
183+ {{- end -}}
184+
185+ {{- end -}}
186+
187+ {{- if ne $js "" -}}
188+ {{- $secureJS := $js | resources.Minify | resources.Fingerprint -}}
189+ < script
190+ type ="text/javascript "
191+ src ="{{ $secureJS.RelPermalink }} "
192+ integrity ="{{ $secureJS.Data.Integrity }} "
193+ crossorigin ="anonymous "
194+ > </ script >
195+ {{- end -}}
196+
197+ {{ if and hugo.IsProduction .Site.Params.plausibleAnalytics .Site.Params.plausibleAnalytics.domain }}
198+ {{- partial "analytics/plausible" . -}}
199+ {{ end }}
200+
201+ {{ if and hugo.IsProduction .Site.Params.umami.serverURL .Site.Params.umami.id }}
202+ {{- partial "analytics/umami" . -}}
203+ {{ end }}
204+
205+ {{ if and hugo.IsProduction .Site.Params.Matomo.instance .Site.Params.Matomo.siteId }}
206+ {{- partial "analytics/matomo" . -}}
207+ {{ end }}
208+
209+
210+ <!-- Twitter Cards -->
211+ {{ template "_internal/twitter_cards.html" . }}
212+
213+
214+ <!-- Open Graph -->
215+ {{ template "_internal/opengraph.html" . }}
216+
217+
218+ <!-- Schema.org-->
219+ {{ partial "schema.html" . }}
220+ </ head >
0 commit comments