🤖 Feat(SEO): optimize SEO meta (#30)

This commit is contained in:
Cell
2022-01-12 23:28:48 +08:00
parent e921ab1420
commit 4a48a1bbc6
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -1,7 +1,10 @@
{{- $params := .Scratch.Get "params" -}}
<meta name="Description" content="{{ $params.description | default .Site.Params.description }}">
<meta name="author" content="{{ .Site.Author.name }}: {{ .Site.Author.link }}">
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
<meta name="keywords" content="{{ range $index, $keyword := .Site.Params.keywords }}{{ if ne $index 0 }},{{ end }}{{ $keyword }}{{ end }}" />
{{- template "_internal/schema.html" . -}}
{{- template "_internal/opengraph.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}