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

github.com/AmazingRise/hugo-theme-diary.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndries <andries.vanhumbeeck@outlook.com>2020-06-12 12:48:59 +0300
committerAndries <andries.vanhumbeeck@outlook.com>2020-06-12 12:48:59 +0300
commit8d025c72f4028938c26e39888bc9a67d4064a077 (patch)
tree55b227e0cb8a5ffb8bc7694a62cd4c12e96ffa26 /layouts
parentef65d542411ea0b35dd6b9a723f62fa507e115dd (diff)
add opengraph
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/head.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1277fd7..baad4d7 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,14 +1,25 @@
<head>
<title>{{.Title}}</title>
+{{ $description := .Params.description}}
+{{if .IsHome}}
+ {{ $description = .Site.Params.description}}
+{{end}}
+
<meta charset="utf-8">
<meta name="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="{{ .Site.Params.googleSiteVerification }}">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
<meta content="telephone=no" name="format-detection">
-<meta name="description" content="{{if .IsHome}}{{ .Site.Params.homePageDescription }}{{else}}{{ .Params.description }}{{end}}">
+<meta name="description" content="{{ $description }}">
<meta name="renderer" content="webkit">
<meta name="theme-color" content="#ffffff">
+
+<!-- open-graph -->
+{{if .Site.Params.enableOpenGraph}}
+{{ template "_internal/opengraph.html" . }}
+{{end}}
+
<!-- metadata -->
{{ if .Site.GoogleAnalytics }}