Browse Source

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
Artur Zylinski 5 years ago
parent
commit
b6a5534d1b
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      layouts/partials/head.html

+ 1
- 0
layouts/partials/head.html View File

@@ -13,6 +13,7 @@
13 13
   {{- else -}}
14 14
   <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
15 15
   {{- end }}
16
+  <meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
16 17
 
17 18
   <!-- CSS -->
18 19
   <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">