Skip to content

Commit 773fd1f

Browse files
Dgiordano33Dan G
andauthored
experimenting on shorter titles (#1086)
Co-authored-by: Dan G <[email protected]>
1 parent ac1fa2b commit 773fd1f

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

site/layouts/partials/head.html

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
<head>
2-
<title>
3-
{{$title := "Checkly Documentation"}}
4-
{{ if .IsHome }}{{ $title = .Site.Title }}{{ else if .Params.head.title }}{{ $title =.Params.head.title }}{{ else }}{{ $title = .Title }}{{ end }}
5-
{{$titleLength := $title | len}}
6-
{{if lt $titleLength 50}}
7-
{{$title}} | Checkly
8-
{{else}}
9-
{{$title}}
10-
{{end}}</title>
2+
{{ if .IsHome }}
3+
<title>{{ .Site.Title }} | Checkly</title>
4+
{{ else if .Params.head.title }}
5+
<title>{{ .Params.head.title }} | Checkly</title>
6+
{{ else }}
7+
<title>{{ .Title }} | Checkly</title>
8+
{{ end }}
9+
10+
{{$title := ""}}
11+
{{ if .IsHome }}{{$title = .Site.Title}}{{ else if .Params.head.title }}{{$title = .Params.head.title}}{{ else }}{{$title = .Title}}{{ end }}
12+
{{$titleLength := $title | len}}
13+
14+
{{ if lt $titleLength 50 }}
15+
<title>{{$title}} | Checkly</title>
16+
{{ else }}
17+
<title>{{$title}}</title>
18+
{{ end }}
1119
<meta charset="utf-8" />
1220
<meta name="description" content="{{ with .Description }}{{ . | markdownify }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . | markdownify}}{{ end }}{{ end }}{{ end }}" />
1321
<meta name="viewport" content="width=device-width" initial-scale="1" maximum-scale="1" />

0 commit comments

Comments
 (0)