diff options
Diffstat (limited to 'layouts/partials/head.html')
| -rw-r--r-- | layouts/partials/head.html | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..477643d --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,23 @@ +<meta charset="utf-8"> +<meta name="viewport" content="width=device-width"> +{{ with .Params.css }} +<link rel="stylesheet" href="{{ . }}"> +{{- else -}} +<link rel="stylesheet" href="/style.css"> +{{- with .Section }} +<link rel="stylesheet" href="/{{ . }}/{{ . }}.css"> +{{- end }} +{{- end }} +<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}</title> +<meta name="author" content="{{ .Site.Params.email }} ({{ .Site.Params.name }})"> +<meta name="description" content="{{- plainify (chomp .Summary) -}}"> +<!-- OpenGraph specification --> +<meta property="og:title" content="{{ if .IsHome }}{{ site.Title }}{{ else }}{{ .Title }}{{ end }}" /> +<meta property="og:description" content="{{- plainify (chomp .Summary) -}}" /> +<meta property="og:url" content="{{ .Permalink}}" /> +{{- $images := .Page.Resources.ByType "image" }} +{{- with index $images 0 }} +{{- $processed := .Resize "600x" }} +{{- $processed := $processed.Crop "512x512" }} +<meta property="og:image" content="{{ $processed.RelPermalink }}" /> +{{- end -}} |
