Explorar el Código

Add meta keywords tag

Apis Necros hace 2 años
padre
commit
f24f0961a8
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      layouts/partials/head.html

+ 4 - 0
layouts/partials/head.html

@@ -3,6 +3,10 @@
 	<meta http-equiv="content-language" content="en-us" />
 	<meta name="author" content="{{ .Site.Params.Author }}" />
 	<meta name="description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.SiteDescription }}{{ end }}" />
+	{{- $keywords := "" }}
+	{{- if .Params.Tags }}{{ $keywords = delimit .Params.Tags "," }}{{ end }}
+	{{- if .IsHome }}{{ $keywords = delimit .Site.Params.Tags "," }}{{ end }}
+	<meta name="keywords" content="{{ replace $keywords "-" " " }}" />
 	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
 	<link rel="pgpkey authn" href="/.well-known/apisnecros.txt" />
 	{{- $title := print .Title " - " .Site.Title }}