|
2 | 2 | {{- partial "head/seo.html" . -}} |
3 | 3 |
|
4 | 4 | <title> |
5 | | - {{- $url := replace .Permalink ( printf "%s" .Site.BaseURL) "" -}} |
6 | | - {{- if eq $url "/" -}} |
7 | | - {{ .Site.Title }} |
| 5 | + {{- if .IsHome -}} |
| 6 | + {{ $.Scratch.Set "title" "devopsdays" }} |
8 | 7 | {{- else -}} |
9 | | - {{- if .Params.Heading -}} |
10 | | - {{ .Params.Heading }} |
| 8 | + {{- if .IsPage -}} |
| 9 | + {{- if or (eq .Type "welcome") (eq .Type "event") (eq .Type "speakers") (eq .Type "talk") (eq .Type "speaker") -}} |
| 10 | + {{- $e := (index $.Site.Data.events (index (split (.Permalink | relURL) "/") 2)) -}} |
| 11 | + {{- if eq (lower .Title) "welcome" -}} |
| 12 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s" $e.city (chomp $e.year)) -}} |
| 13 | + {{- else if eq (lower .Title) "conduct" -}} |
| 14 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - code of conduct" $e.city (chomp $e.year)) -}} |
| 15 | + {{- else if eq (lower .Title) "contact" -}} |
| 16 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - contact information" $e.city (chomp $e.year)) -}} |
| 17 | + {{- else if eq (lower .Title) "location" -}} |
| 18 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - location information" $e.city (chomp $e.year)) -}} |
| 19 | + {{- else if eq (lower .Title) "program" -}} |
| 20 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - program" $e.city (chomp $e.year)) -}} |
| 21 | + {{- else if eq (lower .Title) "propose" -}} |
| 22 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - propose a talk" $e.city (chomp $e.year)) -}} |
| 23 | + {{- else if eq (lower .Title) "registration" -}} |
| 24 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - register" $e.city (chomp $e.year)) -}} |
| 25 | + {{- else if eq (lower .Title) "speakers" -}} |
| 26 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - speakers" $e.city (chomp $e.year)) -}} |
| 27 | + {{- else if eq (lower .Title) "sponsor" -}} |
| 28 | + {{- $.Scratch.Set "title" (printf "devopsdays %s %s - sponsorship information" $e.city (chomp $e.year)) -}} |
| 29 | + {{- else if eq .Type "talk" -}} |
| 30 | + {{- $.Scratch.Set "title" (printf "%s - devopsdays %s %s" .Title $e.city (chomp $e.year)) -}} |
| 31 | + {{- else if eq .Type "speaker" -}} |
| 32 | + {{- $.Scratch.Set "title" (printf "%s - devopsdays %s %s" .Title $e.city (chomp $e.year)) -}} |
| 33 | + {{- else -}} |
| 34 | + {{- $.Scratch.Set "title" .Title -}} |
| 35 | + {{- end -}} |
| 36 | + {{- if not ($.Scratch.Get "title") -}} |
| 37 | + {{- $.Scratch.Set "title" .Title -}} |
| 38 | + {{- end -}} |
| 39 | + {{- end -}} |
| 40 | + {{- if not ($.Scratch.Get "title") -}} |
| 41 | + {{- $.Scratch.Set "title" .Title -}} |
| 42 | + {{- end -}} |
11 | 43 | {{- else -}} |
12 | | - {{ .Title }} |
| 44 | + {{- $.Scratch.Set "title" .Title -}} |
13 | 45 | {{- end -}} |
14 | 46 | {{- end -}} |
| 47 | + {{ $.Scratch.Get "title" }} |
15 | 48 | </title> |
16 | 49 | <link rel="canonical" href="{{ .Permalink | absURL }}"> |
17 | 50 | {{- partial "head_includes.html" . -}} |
0 commit comments