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

github.com/mazgi/hugo-theme-techlog-simple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 732449c..d6e00c5 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -20,7 +20,17 @@
<meta property="og:type" content="article" />
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
- <meta property="og:description" content="{{ .Description }}" />
+ {{ if .Page.IsHome }}
+ {{ if .Site.Params.Description }}
+ <meta property="og:description" content="{{ .Site.Params.Description }}" />
+ {{ end }}
+ {{ else }}
+ {{ if .Description }}
+ <meta property="og:description" content="{{ .Description }}" />
+ {{ else if .Site.Params.Description }}
+ <meta property="og:description" content="{{ .Site.Params.Description }}" />
+ {{ end }}
+ {{ end }}
{{ range $ext := ( slice "png" "jpg" "jpeg" ) }}
{{ $ogImagePath := ( delimit ( slice $.File.Dir $.File.TranslationBaseName "/og" $ext ) "" "." ) }}
{{ if ( fileExists ( print "static/" $ogImagePath ) ) }}