Skip to content

Commit b177645

Browse files
Merge pull request #195 from nikhilkalburgi/title-patch
Enhance Title With Layer5(#163)
2 parents 772b612 + e3786dd commit b177645

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

layouts/partials/head.html

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<meta charset="utf-8">
2+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
3+
{{ range .AlternativeOutputFormats -}}
4+
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
5+
{{ end -}}
6+
7+
{{ $outputFormat := partial "outputformat.html" . -}}
8+
{{ if and hugo.IsProduction (ne $outputFormat "print") -}}
9+
<meta name="robots" content="index, follow">
10+
{{ else -}}
11+
<meta name="robots" content="noindex, nofollow">
12+
{{ end -}}
13+
14+
{{ partialCached "favicons.html" . }}
15+
<title>
16+
{{- if .IsHome -}}
17+
{{ .Site.Title -}}
18+
{{ else -}}
19+
{{ with .Title }}{{ . }} | Layer5{{ end -}}
20+
{{ .Site.Title -}}
21+
{{ end -}}
22+
</title>
23+
<meta name="description" content="{{ template "partials/page-description.html" . }}">
24+
{{ template "_internal/opengraph.html" . -}}
25+
{{ template "_internal/schema.html" . -}}
26+
{{ template "_internal/twitter_cards.html" . -}}
27+
{{ partialCached "head-css.html" . "asdf" -}}
28+
<script
29+
src="https://code.jquery.com/jquery-3.6.3.min.js"
30+
integrity="sha512-STof4xm1wgkfm7heWqFJVn58Hm3EtS31XFaagaa8VMReCXAkQnJZ+jEy8PCC/iT18dFy95WcExNHFTqLyp72eQ=="
31+
crossorigin="anonymous"></script>
32+
{{ if .Site.Params.offlineSearch -}}
33+
<script defer
34+
src="https://unpkg.com/[email protected]/lunr.min.js"
35+
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli"
36+
crossorigin="anonymous"></script>
37+
{{ end -}}
38+
39+
{{ if .Site.Params.prism_syntax_highlighting -}}
40+
<link rel="stylesheet" href="{{ "css/prism.css" | relURL }}"/>
41+
{{ end -}}
42+
43+
{{ template "algolia/head" . -}}
44+
45+
{{ partial "hooks/head-end.html" . -}}
46+
47+
{{/* To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled */ -}}
48+
{{ if hugo.IsProduction -}}
49+
{{ $enableGtagForUniversalAnalytics := not .Site.Params.disableGtagForUniversalAnalytics -}}
50+
{{ if (or $enableGtagForUniversalAnalytics (hasPrefix .Site.GoogleAnalytics "G-")) -}}
51+
{{ template "_internal/google_analytics_gtag.html" . -}}
52+
{{ else -}}
53+
{{ template "_internal/google_analytics_async.html" . -}}
54+
{{ end -}}
55+
{{ end -}}
56+
57+
{{ define "algolia/head" -}}
58+
59+
{{ if and .Site.Params.search (isset .Site.Params.search "algolia") -}}
60+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/[email protected]"
61+
integrity="sha512-TW5eKlwwg7OfQUVBqxjp94/uqtjJJbhkRE3++XGEQjAL1n3y//QVqS3acPkwqkzInaFRtj+w05uyxDbfDXiI1A=="
62+
crossorigin="anonymous" />
63+
{{ end -}}
64+
65+
{{ if ne .Site.Params.algolia_docsearch nil -}}
66+
{{ warnf `Config 'params.algolia_docsearch' is deprecated: use 'params.search.algolia'
67+
For details, see https://www.docsy.dev/docs/adding-content/search/#algolia-docsearch.` -}}
68+
{{ end -}}
69+
70+
{{ end -}}

0 commit comments

Comments
 (0)