Clean up head.html

This commit is contained in:
Eryn Wells 2022-10-15 09:35:07 -07:00
parent 642377d025
commit 17abf75b7e

View file

@ -5,31 +5,29 @@
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title> <title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ site.Title }}</title>
{{ if eq .Kind "page" }} {{- if eq .Kind "page" -}}
<meta name="description" content="{{ .Summary }}" /> <meta name="description" content="{{ .Summary }}" />
<meta name="author" content="{{ .Params.Author | default site.Author.name }}"> <meta name="author" content="{{ .Params.Author | default site.Author.name }}">
{{ else }} {{- else -}}
<meta name="description" content="{{ .Params.description }}"> <meta name="description" content="{{ .Params.description }}">
<meta name="author" content="{{ site.Author.name }}"> <meta name="author" content="{{ site.Author.name }}">
{{ end }} {{- end -}}
{{- range $.Scratch.Get "social-list" -}}
{{ range $.Scratch.Get "social-list" }}
<link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}"> <link rel="preload" as="image" href="{{ printf `%s.svg` . | absURL }}">
{{ end }} {{- end -}}
<link rel="icon" href="{{ `favicon.ico` | absURL }}"> <link rel="icon" href="{{ `favicon.ico` | absURL }}">
<link rel="apple-touch-icon" href="{{ `apple-touch-icon.png` | absURL }}"> <link rel="apple-touch-icon" href="{{ `apple-touch-icon.png` | absURL }}">
{{ hugo.Generator }} {{ hugo.Generator }}
{{ range .AlternativeOutputFormats }} {{- range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ site.Title }}"> <link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink }}" title="{{ site.Title }}">
{{ end }} {{- end -}}
<!-- Misc --> {{- if or hugo.IsProduction (eq site.Params.env "production") -}}
{{ if or hugo.IsProduction (eq site.Params.env "production") }}
{{ template "_internal/schema.html" . }} {{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{ end }} {{- end -}}
</head> </head>