summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Zylinski <artur.zylinski@gmail.com>2019-10-13 23:25:56 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-10-13 22:40:02 +0200
commitb6a5534d1bb207c4eb86eabdeb78175b87a6e42b (patch)
tree9fb131afcda638ff057706da55c0858a21099f29
parent397b547358ccbb6524ae8d2493b5c53afacee123 (diff)
Add meta description to header
Based on hugo docs: https://gohugo.io/variables/site/#example-site-params And developers.google recommendations: https://developers.google.com/web/tools/lighthouse/audits/description?utm_source=lighthouse&utm_medium=devtools
-rw-r--r--layouts/partials/head.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1814f00..56a3157 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -13,6 +13,7 @@
{{- else -}}
<title>{{ .Title }} &middot; {{ .Site.Title }}</title>
{{- end }}
+ <meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
<!-- CSS -->
<link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">