-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added head.html in partials for local deployment (#1174)
- Loading branch information
1 parent
e013d00
commit 6333ec4
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
{{ hugo.Generator }} | ||
{{ range .AlternativeOutputFormats -}} | ||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}"> | ||
{{ end -}} | ||
|
||
{{ $outputFormat := partial "outputformat.html" . -}} | ||
{{ if and hugo.IsProduction (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> | ||
{{ $desc := .Page.Description | default (.Page.Content | safeHTML | truncate 150) -}} | ||
<meta name="description" content="{{ $desc }}"> | ||
{{ template "_internal/opengraph.html" . -}} | ||
{{ template "_internal/schema.html" . -}} | ||
{{ template "_internal/twitter_cards.html" . -}} | ||
{{ partialCached "head-css.html" . "asdf" -}} | ||
<script | ||
src="https://code.jquery.com/jquery-3.6.0.min.js" | ||
integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK" | ||
crossorigin="anonymous"></script> | ||
{{ if .Site.Params.offlineSearch -}} | ||
<script defer | ||
src="https://unpkg.com/lunr@2.3.9/lunr.min.js" | ||
integrity="sha384-203J0SNzyqHby3iU6hzvzltrWi/M41wOP5Gu+BiJMz5nwKykbkUx8Kp7iti0Lpli" | ||
crossorigin="anonymous"></script> | ||
{{ end -}} | ||
|
||
{{ if .Site.Params.prism_syntax_highlighting -}} | ||
<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 hugo.IsProduction -}} | ||
{{ template "_internal/google_analytics.html" . -}} | ||
{{ end -}} |