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

github.com/Mitrichius/hugo-theme-anubis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaksim Iakunin <yakuninm+github@gmail.com>2021-10-19 20:06:44 +0300
committerMaksim Iakunin <yakuninm+github@gmail.com>2021-10-19 20:06:44 +0300
commit30ca3e0a083ed63832257cf219dc1facc87b0e42 (patch)
treeda7875182e581b113bd45d1b8363c0c43cae42c3
parent8b3e9c711ef555c3096a9a0396cf685083fa5c26 (diff)
Fixing a bug with `<meta name=description>`
-rw-r--r--layouts/partials/head.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 8dfcd5c..cbeb1d9 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -5,7 +5,7 @@
<meta name="referrer" content="no-referrer-when-downgrade">
<title>{{ if and (.Title) (not .IsHome) }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
-<meta name="description" content="{{ .Site.Params.Description }}">
+<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}">
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}