This repository has been archived on 2022-01-14. You can view files and clone it, but cannot push or open issues/pull-requests.
nwt/layouts/partials/head.html

15 lines
1.3 KiB
HTML
Raw Normal View History

2021-11-29 21:30:06 -05:00
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>{{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} ─ {{ $.Site.Title }}{{ end }}</title>
{{ with .Site.Params.favicon }}<link rel="shortcut icon" href="{{ . | absURL }}" />{{ end }}
<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" />
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta name="keywords" content="{{ if .IsPage}}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
{{ if $.Params.noindex }}<meta name="robots" content="noindex">{{ end }}
<meta name="author" content="{{ range .Site.Author }}{{ . }}{{ end }}">
<meta name="referrer" content="no-referrer-when-downgrade" />
{{- $style := resources.Get "/css/main.css" | toCSS | minify | fingerprint }}
<link rel="stylesheet" href="{{ $style.Permalink }}">
{{ template "_internal/opengraph.html" . }}
{{ template "_internal/schema.html" . }}
{{ template "_internal/twitter_cards.html" . }}