aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/head.html
diff options
context:
space:
mode:
Diffstat (limited to 'themes/default/layouts/partials/head.html')
-rw-r--r--themes/default/layouts/partials/head.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/head.html b/themes/default/layouts/partials/head.html
new file mode 100644
index 0000000..1668d57
--- /dev/null
+++ b/themes/default/layouts/partials/head.html
@@ -0,0 +1,72 @@
+{{- $noindex := "" -}}
+{{- $image := "" -}}
+{{- $author := .Section -}}
+{{- $kind := in (slice "home" "taxonomy" "term") .Page.Kind -}}
+
+{{- if not $kind -}}
+ {{- $image = print ("" | absURL) "/data/media/" $author "/" $author "-profile.png" -}}
+{{- end -}}
+
+{{- with or .Params.Feed .Params.Unlisted .Params.ExpiryDate -}}
+ {{- $noindex = "noindex,nofollow" -}}
+{{- end }}
+
+<!-- HTML Meta Tags -->
+<meta charset="utf-8" />
+<meta name="author" content="{{ or $author $.Site.Title -}}" />
+<meta name="robots" content="{{ or $noindex .Site.Params.site.robots "index,follow" }}" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<meta name="keywords" content="{{- partial "head-title.html" . -}}" />
+<meta name="generator" content="Hugo {{ hugo.Version }}" />
+
+<!-- Search Engine Tags -->
+<meta itemprop="name" content="{{ partial "head-title.html" . -}}" />
+<meta itemprop="description" content="{{- partial "head-description.html" . -}}" />
+<meta itemprop="image" content="{{ $image }}" />
+
+<!-- Open Graph Meta Tags -->
+<meta property="og:title" content="{{ partial "head-title.html" . -}}" />
+<meta property="og:description" content="{{- partial "head-description.html" . -}}" />
+<meta property="og:url" content="{{ .Permalink }}" />
+<meta property="og:image" content="{{ $image }}" />
+<meta property="og:type" content="website" />
+<meta property="article:published_time" content="{{ (or .Params.PublishDate now.UTC) | time.Format "2006-01-02T15:04:05Z" }}" />
+<meta property="article:modified_time " content="{{ (or .Params.LastMod now.UTC) | time.Format "2006-01-02T15:04:05Z" }}" />
+
+<!-- Twitter Meta Tags -->
+<meta name="twitter:card" content="summary_large_image" />
+<meta name="twitter:title" content="{{ partial "head-title.html" . -}}" />
+<meta name="twitter:description" content="{{- partial "head-description.html" . -}}" />
+<meta name="twitter:image" content="{{ $image }}" />
+
+<!-- Extra Meta Tags -->
+<meta name='base-url' content="{{ "" | absURL }}" />
+<meta name='last-modified' content="{{ now.UTC.Format "Mon, 02 Jan 2006 15:04:05 GMT" }}" />
+
+<!-- Search Verification -->
+{{- partial "head-search.html" . -}}
+
+<!-- Feed Discovery -->
+{{- partial "head-discovery.html" . -}}
+
+<!-- Canonicalization -->
+{{- partial "head-canonical.html" . -}}
+
+<!-- Styles -->
+{{- partial "head-css.html" . -}}
+
+<!-- Scripts -->
+{{- partial "head-js.html" . -}}
+
+<!-- Progressive Enhancement -->
+{{- partial "head-manifest.html" . -}}
+
+<!-- Content Security Policy -->
+{{- partial "head-csp.html" . -}}
+
+<!-- No Scripts -->
+<noscript>
+ <style>
+ {{ safeCSS (readFile "assets/css/noscript.css") }}
+ </style>
+</noscript>