hugo-theme-tiles/layouts/partials/site-head.html

55 lines
2.2 KiB
HTML

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="{{ .Permalink }}">
<meta name="generator" content="Source Themes Tiles {{ site.Data.academic.version }}">
{{/* Generate page description. */}}
{{ $desc := $.Site.Title }}
{{ if .Params.Summary }}
{{ $desc = .Params.Summary }}
{{ else if .IsPage }}
{{ $desc = .Summary }}
{{ else if site.Params.description }}
{{ $desc = site.Params.description }}
{{ end }}
<meta name="description" content="{{ $desc }}">
<meta name="author" content="{{ .Params.author }}">
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ site.Title }}">
<meta property="og:description" content="{{ $desc }}">
{{ if .IsPage }}
<meta property="og:type" content="article">
{{ if not .PublishDate.IsZero }}
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ else if not .Date.IsZero }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ end }}
{{ if not .Lastmod.IsZero }}
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ end }}
{{ else }}
{{ if not .Date.IsZero }}
<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ end }}
{{ end }}
{{ block "title" . }}
{{ if .IsHome }}
<title>{{ $.Site.Title }}</title>
{{ else }}
<title>{{ .Title }} / {{ $.Site.Title }}</title>
{{ end }}
{{ end }}