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

github.com/lucperkins/hugo-fresh.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Biller <n.d.biller@gmail.com>2019-10-08 02:42:08 +0300
committerNathan Biller <n.d.biller@gmail.com>2019-10-08 02:42:08 +0300
commit31937b2e9f2ba345244693b48b63eb7fef671c93 (patch)
treee660658328d930fb49f4076366b7654832e07273
parent7c94d860e1caf1b77b74f5594756f0f36351be05 (diff)
Added Open Graph Internal Template as an option for easy social sharing.
-rw-r--r--exampleSite/config.yaml4
-rw-r--r--layouts/partials/meta.html4
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