blob: 4dcf858e24790ff8e06e6fd197e0672473f12ef6 (
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
|
<meta charset="utf-8">
{{ hugo.Generator }}
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover">
<meta name="color-scheme" content="light only">
<meta name="supported-color-schemes" content="light only">
{{ define "title" }}
{{ $title := .Title }}
{{ if not (eq $title .Site.Title) }}
<title>{{ $title }} – {{ .Site.Title }}</title>
{{ else }}
<title>{{ .Site.Title }}{{ if isset .Site.Params "slogan" }} – {{ with .Site.Params.slogan }}{{ . }}{{ end }}{{ end }}</title>
{{ end }}
{{ end }}
{{- block "title" . }}{{- end }}
{{ if .Site.Params.syntax.enableBuiltinFont }}
{{ $css := resources.Get "css/source-code-pro.css" | resources.Minify | resources.Fingerprint "sha384" }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
{{ end }}
{{ $css := resources.Get "css/core.css" | resources.Minify | resources.Fingerprint "sha384" }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
{{ $themePath := "" }}
{{ $theme := "dracula" }}
{{ with .Site.Params.syntax }}
{{ $use := "none" }}
{{ if isset . "use" }}{{ $use = .use | lower }}{{ end }}
{{ if isset . "theme" }}{{ $theme = .theme | lower }}{{ end }}
{{ if eq $use "hljs" }}
{{ $themePath = print (path.Join "css/hljs/" $theme) ".css" }}
{{ else if eq $use "prismjs" }}
{{ $themePath = print (path.Join "css/prism/" $theme) ".css" }}
{{ end }}
{{ end }}
{{ if eq $themePath "" }}
{{ $themePath = print (path.Join "css/chroma/" $theme) ".css" }}
{{ end }}
{{ $css := resources.Get $themePath | resources.Minify | resources.Fingerprint "sha384" }}
<link rel="stylesheet" href="{{ $css.RelPermalink }}" integrity="{{ $css.Data.Integrity }}">
|