website/themes/terminal-plus-minus/layouts/partials/head.html

45 lines
2.0 KiB
HTML
Raw Normal View History

2019-09-01 17:51:06 +00:00
<meta name="author" content="{{ .Site.Author.name }}">
<meta name="application-name" content="{{ .Site.Title }}">
<meta name="description" content="{{ .Site.Params.Description }}">
<meta name="robots" content="noodp"/>
{{- with .Site.Params.keywords -}}
{{- $keywords := delimit . ", " -}}
<meta name="keywords" content="{{ $keywords }}">
{{- end -}}
<link href="{{ .Permalink }}" rel="canonical">
<!-- Twitter card -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="{{ if .IsHome }}{{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ else }}{{ .Title }} :: {{ $.Site.Title }} — {{ $.Site.Params.Subtitle }}{{ end }}" />
<meta name="twitter:description" content="{{ if .IsHome }}{{ $.Site.Params.tagline }}{{ else }}{{ .Summary | plainify }}{{ end }}" />
<meta name="twitter:site" content="{{ $.Site.BaseURL }}" />
<meta name="twitter:creator" content="{{ .Params.Author }}" />
<meta name="twitter:image" content="{{ with .Params.Cover }}{{ . | absURL }}{{ end }}">
<!-- Metadata -->
<meta property="og:type" content="website" />
<meta property="og:name" content="{{ .Site.Author.name }}">
<meta property="og:title" content="{{ .Site.Title }}">
{{- with .Site.Params.Description -}}
<meta property="og:description" content="{{ . }}">
{{- end -}}
<meta property="og:url" content="{{ .Site.BaseURL }}">
<meta property="og:site_name" content="{{ .Site.Title }}">
{{ $style := resources.Get "scss/main.scss" | toCSS | minify }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{ range .AlternativeOutputFormats -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
{{ end -}}
{{- if $.Site.GoogleAnalytics -}}
{{- template "_internal/google_analytics.html" . -}}
{{- end -}}