about summary refs log tree commit diff
path: root/layouts/partials/head.html
blob: c37bba466776fd3f3a91913106b74a0d91f6770f (plain) (blame)
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
{{ $readable := resources.Get "css/readable/readable.css" }}
{{ $theme := resources.Get "css/theme.css" }}
{{ $custom := resources.Get "css/custom.css" }}
{{ $style := slice $readable $theme $custom | resources.Concat "css/style.css" | minify | fingerprint }}

{{ $fullTitle := .Title }}
{{ with .Params.chapterName }}
  {{ $fullTitle = printf "%s – %s" $fullTitle . }}
{{ end }}

{{ range .Ancestors }}
{{ if or .Site.Params.OnlyBooks (in .Params.categories "book") }}
  {{ $fullTitle = printf "%s, %s" .Title $fullTitle }}
{{ end }}
{{ end }}

<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer-when-downgrade">

<title>
	{{ if and (.Title) (not .IsHome) }}
	{{ $fullTitle }} -
	{{ end }}
	{{ .Site.Title }}
</title>
<meta name="description" content="{{ .Site.Params.Description }}">
<link rel="stylesheet" type="text/css" href="{{ $style.RelPermalink }}">
{{ with .OutputFormats.Get "rss" -}}
	<link rel="{{.Rel}}" type="{{.MediaType.Type}}"
											href="{{.Permalink}}" title="{{$.Site.Title | safeHTML}}"/>
{{ end -}}
{{ range .Site.Params.relMe }}
	<link href="{{.}}" rel="me">
{{ end}}