Include topics in meta description tag
This commit is contained in:
parent
4e21f00999
commit
c802241deb
|
@ -5,7 +5,12 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>{{ .Title }}</title>
|
||||
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
|
||||
{{ .Scratch.Set "desc" slice }}
|
||||
{{ with .Site.Params.description }}{{ $.Scratch.Add "desc" (slice .) }}{{ end }}
|
||||
{{ with .Site.Params.topics }}{{ $.Scratch.Add "desc" (slice (delimit . " & ")) }}{{ end }}
|
||||
{{ if gt (len (.Scratch.Get "desc")) 0 }}
|
||||
<meta name="description" content="{{ delimit (.Scratch.Get "desc") " " }}">
|
||||
{{ end }}
|
||||
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
{{ $style := resources.Get "style/main.sass" | resources.ToCSS }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
|
Loading…
Reference in New Issue