Merge pull request #87 from nathanbiller/addOpenGraph

Added Open Graph Internal Template as an option for easy social sharing.
This commit is contained in:
Stefan M
2019-10-09 09:09:03 +02:00
committed by GitHub
2 changed files with 8 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ disableKinds:
params: params:
# Open graph allows easy social sharing. If you don't want it you can set it to false or just delete the variable
openGraph: true
# Used as meta data; describe your site to make Google Bots happy
description:
navbarlogo: navbarlogo:
# Logo (from static/images/logos/___) # Logo (from static/images/logos/___)
image: logos/fresh.svg image: logos/fresh.svg

View File

@@ -1,4 +1,8 @@
{{ template "_internal/google_analytics_async.html" . }} {{ template "_internal/google_analytics_async.html" . }}
{{ if eq .Site.Params.openGraph true }}
{{ template "_internal/opengraph.html" . }}
{{ end }}
<meta name="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else if .Site.Params.Description }}{{ .Site.Params.Description }}{{ else }}Hardcoded description; the author should update :){{ end }}" />
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge"> <meta http-equiv="x-ua-compatible" content="ie=edge">