Skip to content

Commit 316e8bb

Browse files
authored
Merge pull request #4304 from marcduiker/v1.13
Override head partial to ignore deprecated GA script from Docsy
2 parents 416c7d2 + b277085 commit 316e8bb

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

daprdocs/layouts/partials/head.html

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<meta charset="utf-8">
2+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
3+
{{ hugo.Generator }}
4+
{{ range .AlternativeOutputFormats -}}
5+
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
6+
{{ end -}}
7+
8+
{{ $outputFormat := partial "outputformat.html" . -}}
9+
{{ if and hugo.IsProduction (ne $outputFormat "print") -}}
10+
<meta name="robots" content="index, follow">
11+
{{ else -}}
12+
<meta name="robots" content="noindex, nofollow">
13+
{{ end -}}
14+
15+
{{ partialCached "favicons.html" . }}
16+
<title>
17+
{{- if .IsHome -}}
18+
{{ .Site.Title -}}
19+
{{ else -}}
20+
{{ with .Title }}{{ . }} | {{ end -}}
21+
{{ .Site.Title -}}
22+
{{ end -}}
23+
</title>
24+
{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}}
25+
<meta name="description" content="{{ $desc }}">
26+
{{ template "_internal/opengraph.html" . -}}
27+
{{ template "_internal/schema.html" . -}}
28+
{{ template "_internal/twitter_cards.html" . -}}
29+
{{ partialCached "head-css.html" . "asdf" -}}
30+
<script
31+
src="https://code.jquery.com/jquery-3.5.1.min.js"
32+
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
33+
crossorigin="anonymous"></script>
34+
{{ if .Site.Params.offlineSearch -}}
35+
<script
36+
src="https://unpkg.com/[email protected]/lunr.min.js"
37+
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY"
38+
crossorigin="anonymous"></script>
39+
{{ end -}}
40+
41+
{{ if .Site.Params.prism_syntax_highlighting -}}
42+
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/>
43+
{{ end -}}
44+
45+
{{ partial "hooks/head-end.html" . -}}

0 commit comments

Comments
 (0)