Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/pacollins/hugo-future-imperfect-slim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacollins <thepatrickcollins@gmail.com>2020-08-02 10:48:42 +0300
committerpacollins <thepatrickcollins@gmail.com>2020-08-02 10:48:42 +0300
commite9d3502ef5692e9fd4d4de739fd9a101bb58de99 (patch)
treeb53fd1f02ba3fa1dffc53810b057d2630781a4fe
parenta3ccad4e01b0156985703f22b4afd39acaca18a3 (diff)
Theme-level SEO
-rw-r--r--layouts/partials/head.html24
1 files changed, 20 insertions, 4 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index b1d8177..e7af4ce 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,10 +1,26 @@
<head>
{{ partial "meta" . }}
{{- hugo.Generator -}}
- {{- template "_internal/schema.html" . -}}
- {{- template "_internal/opengraph.html" . -}}
- {{- template "_internal/twitter_cards.html" . -}}
- {{- template "_internal/google_news.html" . -}}
+
+ {{ with .Site.Title }}<meta property="og:site_name" content="{{ . }}">{{ end }}
+ {{ with .Title }}<meta property=“og:title” content="{{ . }}">{{ end }}
+ {{ with .Description }}<meta property="og:description" content="{{ . }}">{{ end }}
+ <meta property="og:url" content="{{ .RelPermalink | absURL }}">
+ <meta property="og:type" content="{{ cond .IsHome "website" "article" }}">
+ {{ with .Params.openGraph }}
+ {{ range . }}
+ <meta property="og:image" content="{{ .src | absURL }}">
+ <meta property="og:image:alt" content="{{ .alt }}">
+ {{ end }}
+ {{ end }}
+ {{ with .Params.images }}
+ {{ range . }}
+ <meta property="og:image" content="{{ .src | absURL }}">
+ <meta property="og:image:alt" content="{{ .alt }}">
+ {{ end }}
+ {{ end }}
+ {{ with .Site.Params.Social.twitter}}<meta property="twitter:site" content="{{ . }}">{{ end }}
+
{{- if .Site.Params.enableCDN -}}
{{- if .Site.Params.highlightjs -}}<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.0.3/styles/{{ .Site.Params.highlightjsTheme | default "default" }}.min.css">{{- end -}}
{{- range .Site.Params.cssFiles -}}