2021-08-11 05:28:33 +00:00
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
2023-10-23 23:53:16 +00:00
|
|
|
<meta name="theme-color" content="rgb(255,255,255)" />
|
2021-08-11 05:28:33 +00:00
|
|
|
{{/* Title */}}
|
|
|
|
{{ if .IsHome -}}
|
2022-01-19 00:24:15 +00:00
|
|
|
<title>{{ .Site.Title | emojify }}</title>
|
|
|
|
<meta name="title" content="{{ .Site.Title | emojify }}" />
|
2021-08-11 05:28:33 +00:00
|
|
|
{{- else -}}
|
2022-01-19 00:24:15 +00:00
|
|
|
<title>{{ .Title | emojify }} · {{ .Site.Title | emojify }}</title>
|
|
|
|
<meta name="title" content="{{ .Title | emojify }} · {{ .Site.Title | emojify }}" />
|
2021-08-11 05:28:33 +00:00
|
|
|
{{- end }}
|
2022-01-19 00:28:20 +00:00
|
|
|
{{/* Asset bundles */}}
|
|
|
|
{{ $assets := newScratch }}
|
2023-05-25 03:58:30 +00:00
|
|
|
{{ $algorithm := .Site.Params.fingerprintAlgorithm | default "sha256" }}
|
2023-10-22 21:55:29 +00:00
|
|
|
{{ $jsAppearance := resources.Get "js/appearance.js" }}
|
|
|
|
{{ $jsAppearance = $jsAppearance | resources.Minify | resources.Fingerprint $algorithm }}
|
|
|
|
<script
|
|
|
|
type="text/javascript"
|
|
|
|
src="{{ $jsAppearance.RelPermalink }}"
|
|
|
|
integrity="{{ $jsAppearance.Data.Integrity }}"
|
|
|
|
></script>
|
2022-11-07 22:08:28 +00:00
|
|
|
{{ $cssScheme := resources.Get (printf "css/schemes/%s.css" (lower .Site.Params.colorScheme | default "congo")) }}
|
2022-01-19 00:28:20 +00:00
|
|
|
{{ if not $cssScheme }}
|
|
|
|
{{ $cssScheme = resources.Get "css/schemes/congo.css" }}
|
2021-08-21 02:20:29 +00:00
|
|
|
{{ end }}
|
2022-01-19 00:28:20 +00:00
|
|
|
{{ $assets.Add "css" (slice $cssScheme) }}
|
|
|
|
{{ $cssMain := resources.Get "css/compiled/main.css" }}
|
|
|
|
{{ $assets.Add "css" (slice $cssMain) }}
|
|
|
|
{{ $cssCustom := resources.Get "css/custom.css" }}
|
|
|
|
{{ if $cssCustom }}
|
|
|
|
{{ $assets.Add "css" (slice $cssCustom) }}
|
|
|
|
{{ end }}
|
2023-05-25 03:58:30 +00:00
|
|
|
{{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint $algorithm }}
|
2021-08-21 02:20:29 +00:00
|
|
|
<link
|
|
|
|
type="text/css"
|
|
|
|
rel="stylesheet"
|
2022-01-19 00:28:20 +00:00
|
|
|
href="{{ $bundleCSS.RelPermalink }}"
|
|
|
|
integrity="{{ $bundleCSS.Data.Integrity }}"
|
2021-08-21 02:20:29 +00:00
|
|
|
/>
|
2022-01-19 01:13:42 +00:00
|
|
|
{{ if .Site.Params.enableSearch | default false }}
|
|
|
|
{{ $jsFuse := resources.Get "lib/fuse/fuse.min.js" }}
|
|
|
|
{{ $jsSearch := resources.Get "js/search.js" }}
|
|
|
|
{{ $assets.Add "js" (slice $jsFuse $jsSearch) }}
|
|
|
|
{{ end }}
|
2022-01-25 23:49:30 +00:00
|
|
|
{{ if .Site.Params.enableCodeCopy | default false }}
|
|
|
|
{{ $jsCode := resources.Get "js/code.js" }}
|
|
|
|
{{ $assets.Add "js" (slice $jsCode) }}
|
|
|
|
{{ end }}
|
2023-09-11 23:22:49 +00:00
|
|
|
{{ if eq (site.Language.LanguageDirection | default "ltr") "rtl" }}
|
2022-05-01 01:17:30 +00:00
|
|
|
{{ $jsRTL := resources.Get "js/rtl.js" }}
|
|
|
|
{{ $assets.Add "js" (slice $jsRTL) }}
|
|
|
|
{{ end }}
|
2022-01-19 00:52:49 +00:00
|
|
|
{{ if $assets.Get "js" }}
|
2023-05-25 03:58:30 +00:00
|
|
|
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint $algorithm }}
|
2023-10-22 21:55:29 +00:00
|
|
|
<script
|
|
|
|
defer
|
|
|
|
type="text/javascript"
|
|
|
|
id="script-bundle"
|
|
|
|
src="{{ $bundleJS.RelPermalink }}"
|
|
|
|
integrity="{{ $bundleJS.Data.Integrity }}"
|
|
|
|
data-copy="{{ i18n "code.copy" }}"
|
|
|
|
data-copied="{{ i18n "code.copied" }}"
|
|
|
|
></script>
|
|
|
|
{{ end }}
|
|
|
|
{{/* Metadata */}}
|
|
|
|
<meta
|
|
|
|
name="description"
|
|
|
|
content="{{ with .Description }}
|
|
|
|
{{ . }}
|
|
|
|
{{ else }}
|
|
|
|
{{ if .IsPage }}
|
|
|
|
{{ .Summary }}
|
|
|
|
{{ else }}
|
|
|
|
{{ with .Site.Params.description }}{{ . }}{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}"
|
|
|
|
/>
|
|
|
|
{{ with union .Site.Params.keywords .Params.keywords -}}
|
|
|
|
<meta name="keywords" content="{{ delimit . `, ` }}" />
|
|
|
|
{{- end }}
|
|
|
|
{{ with .Site.Params.robots }}
|
|
|
|
<meta name="robots" content="{{ . }}" />
|
2022-01-19 00:52:49 +00:00
|
|
|
{{ end }}
|
2023-10-22 21:55:29 +00:00
|
|
|
{{ with .Params.robots }}
|
|
|
|
<meta name="robots" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
<link rel="canonical" href="{{ .Permalink }}" />
|
|
|
|
{{ range .AlternativeOutputFormats -}}
|
|
|
|
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .RelPermalink ($.Site.Title | emojify) | safeHTML }}
|
|
|
|
{{ end -}}
|
2021-08-11 05:28:33 +00:00
|
|
|
{{/* Icons */}}
|
2021-08-14 00:47:33 +00:00
|
|
|
{{ if templates.Exists "partials/favicons.html" }}
|
|
|
|
{{ partialCached "favicons.html" .Site }}
|
|
|
|
{{ else }}
|
2021-08-25 23:44:41 +00:00
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ "apple-touch-icon.png" | relURL }}" />
|
|
|
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon-32x32.png" | relURL }}" />
|
|
|
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon-16x16.png" | relURL }}" />
|
|
|
|
<link rel="manifest" href="{{ "site.webmanifest" | relURL }}" />
|
2021-08-14 00:47:33 +00:00
|
|
|
{{ end }}
|
2021-08-11 05:28:33 +00:00
|
|
|
{{/* Site Verification */}}
|
|
|
|
{{ with .Site.Params.verification.google }}
|
|
|
|
<meta name="google-site-verification" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.verification.bing }}
|
|
|
|
<meta name="msvalidate.01" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.verification.pinterest }}
|
|
|
|
<meta name="p:domain_verify" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{ with .Site.Params.verification.yandex }}
|
|
|
|
<meta name="yandex-verification" content="{{ . }}" />
|
|
|
|
{{ end }}
|
|
|
|
{{/* Social */}}
|
|
|
|
{{ template "_internal/opengraph.html" . }}
|
|
|
|
{{ template "_internal/twitter_cards.html" . }}
|
2021-08-16 07:06:59 +00:00
|
|
|
{{/* Schema */}}
|
2021-08-18 07:06:14 +00:00
|
|
|
{{ partial "schema.html" . }}
|
2021-08-11 05:28:33 +00:00
|
|
|
{{/* Me */}}
|
2023-11-12 10:52:28 +00:00
|
|
|
{{ with .Site.Params.Author.name }}<meta name="author" content="{{ . }}" />{{ end }}
|
|
|
|
{{ with .Site.Params.Author.links }}
|
2021-08-13 06:35:32 +00:00
|
|
|
{{ range $links := . }}
|
|
|
|
{{ range $name, $url := $links }}<link href="{{ $url }}" rel="me" />{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2021-11-03 05:52:40 +00:00
|
|
|
{{/* Vendor */}}
|
|
|
|
{{ partial "vendor.html" . }}
|
2021-08-11 05:28:33 +00:00
|
|
|
{{/* Analytics */}}
|
2023-03-04 21:58:13 +00:00
|
|
|
{{ partial "analytics.html" . }}
|
2021-08-11 05:28:33 +00:00
|
|
|
{{/* Extend head - eg. for custom analytics scripts, etc. */}}
|
|
|
|
{{ if templates.Exists "partials/extend-head.html" }}
|
2023-09-24 04:41:31 +00:00
|
|
|
{{ partial "extend-head.html" . }}
|
2021-08-11 05:28:33 +00:00
|
|
|
{{ end }}
|
2023-05-25 03:58:30 +00:00
|
|
|
</head>
|