diff options
author | Nathan Biller <n.d.biller@gmail.com> | 2019-10-08 02:42:08 +0300 |
---|---|---|
committer | Nathan Biller <n.d.biller@gmail.com> | 2019-10-08 02:42:08 +0300 |
commit | 31937b2e9f2ba345244693b48b63eb7fef671c93 (patch) | |
tree | e660658328d930fb49f4076366b7654832e07273 | |
parent | 7c94d860e1caf1b77b74f5594756f0f36351be05 (diff) |
Added Open Graph Internal Template as an option for easy social sharing.
-rw-r--r-- | exampleSite/config.yaml | 4 | ||||
-rw-r--r-- | layouts/partials/meta.html | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 4447d30..07c1832 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -10,6 +10,10 @@ disableKinds: 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: # Logo (from static/images/logos/___) image: logos/fresh.svg diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index b894f4d..517d815 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -1,4 +1,8 @@ {{ 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 name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta http-equiv="x-ua-compatible" content="ie=edge">
\ No newline at end of file |