add head.html (#3578)
parent
711adc804b
commit
22bfc6f4ab
@ -0,0 +1,43 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
{{ hugo.Generator }}
|
||||
{{- $outputFormat := partial "outputformat.html" . -}}
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
|
||||
{{ if and (eq (getenv "HUGO_ENV") "production") (ne $outputFormat "print") -}}
|
||||
<META NAME="ROBOTS" CONTENT="INDEX, FOLLOW">
|
||||
{{ else -}}
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
{{ end -}}
|
||||
|
||||
{{ partialCached "favicons.html" . }}
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ .Site.Params.Description }}">
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{- template "_internal/google_news.html" . -}}
|
||||
{{- template "_internal/schema.html" . -}}
|
||||
{{- template "_internal/twitter_cards.html" . -}}
|
||||
|
||||
{{ partialCached "head-css.html" . "asdf" }}
|
||||
<script
|
||||
src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"
|
||||
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
|
||||
crossorigin="anonymous"></script>
|
||||
{{ if .Site.Params.offlineSearch }}
|
||||
<script
|
||||
src="https://unpkg.com/lunr@2.3.8/lunr.min.js"
|
||||
integrity="sha384-vRQ9bDyE0Wnu+lMfm57BlYLO0/XauFuKpVsZPs7KEDwYKktWi5+Kz3MP8++DFlRY"
|
||||
crossorigin="anonymous"></script>
|
||||
{{end}}
|
||||
{{ if .Site.Params.prism_syntax_highlighting }}
|
||||
<!-- stylesheet for Prism -->
|
||||
<link rel="stylesheet" href="{{ "/css/prism.css" | relURL }}"/>
|
||||
{{ end }}
|
||||
{{ partial "hooks/head-end.html" . }}
|
||||
<!--To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled -->
|
||||
{{ if eq (getenv "HUGO_ENV") "production" }}
|
||||
{{ template "_internal/google_analytics_async.html" . }}
|
||||
{{ end }}
|
||||
Loading…
Reference in New Issue