forked from devopsdays/devopsdays-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhead.html
50 lines (49 loc) · 2.69 KB
/
head.html
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
{{- partial "meta.html" . -}}
{{- partial "head/seo.html" . -}}
<title>
{{- if .IsHome -}}
{{ $.Scratch.Set "title" "devopsdays" }}
{{- else -}}
{{- if .IsPage -}}
{{- if or (eq .Type "welcome") (eq .Type "event") (eq .Type "speakers") (eq .Type "talk") (eq .Type "speaker") -}}
{{- $e := (index $.Site.Data.events (index (split (.Permalink | relURL) "/") 2)) -}}
{{- if eq (lower .Title) "welcome" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "conduct" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - code of conduct" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "contact" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - contact information" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "location" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - location information" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "program" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - program" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "propose" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - propose a talk" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "registration" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - register" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "speakers" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - speakers" $e.city (chomp $e.year)) -}}
{{- else if eq (lower .Title) "sponsor" -}}
{{- $.Scratch.Set "title" (printf "devopsdays %s %s - sponsorship information" $e.city (chomp $e.year)) -}}
{{- else if eq .Type "talk" -}}
{{- $.Scratch.Set "title" (printf "%s - devopsdays %s %s" .Title $e.city (chomp $e.year)) -}}
{{- else if eq .Type "speaker" -}}
{{- $.Scratch.Set "title" (printf "%s - devopsdays %s %s" .Title $e.city (chomp $e.year)) -}}
{{- else -}}
{{- $.Scratch.Set "title" .Title -}}
{{- end -}}
{{- if not ($.Scratch.Get "title") -}}
{{- $.Scratch.Set "title" .Title -}}
{{- end -}}
{{- end -}}
{{- if not ($.Scratch.Get "title") -}}
{{- $.Scratch.Set "title" .Title -}}
{{- end -}}
{{- else -}}
{{- $.Scratch.Set "title" .Title -}}
{{- end -}}
{{- end -}}
{{ $.Scratch.Get "title" }}
</title>
<link rel="canonical" href="{{ .Permalink | absURL }}">
{{- partial "head_includes.html" . -}}