Fix the site meta description to pull from the localized site data (#121)

This commit is contained in:
alex bezek 2020-10-24 13:40:51 -04:00 committed by GitHub
parent 47c4ef0251
commit 43d97217c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,7 +2,14 @@
<html lang="en">
<head>
<title>{{- .Site.Title -}}</title>
<meta name="description" content="{{ .Site.Params.description }}" />
{{ $siteDescription := .Site.Params.description }}
{{ if (index .Site.Data .Site.Language.Lang).site }}
{{ $siteConfig := (index .Site.Data .Site.Language.Lang).site }}
{{ if $siteConfig.description }}
{{ $siteDescription = $siteConfig.description }}
{{ end }}
{{ end }}
<meta name="description" content="{{ $siteDescription }}" />
<!-- import common headers -->
{{- partial "header.html" . -}}