Improve description meta tag.
This commit is contained in:
parent
dc69feb0d5
commit
1994fe787a
1 changed files with 10 additions and 4 deletions
|
|
@ -13,11 +13,13 @@
|
|||
"datePublished": {{ .Date.Format "2006-01-02T15:04:05Z07:00" }},
|
||||
"dateModified": {{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }},
|
||||
"url" : {{ .Permalink }},
|
||||
{{ with (.Description | default (replaceRE "\n" " " (.Plain | truncate 170))) -}}
|
||||
"description": {{ . }},
|
||||
{{ if .IsHome -}}
|
||||
{{ with $.Param "description" }}"description": {{ . }},{{ end }}
|
||||
{{ else -}}
|
||||
{{ with .Description }}"description": {{ . }},{{ end }}
|
||||
{{ end -}}
|
||||
{{ with .Params.tags -}}
|
||||
"keywords": {{ . }},
|
||||
"keywords": {{ delimit . " " }},
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
"@type": "WebPage",
|
||||
|
|
|
|||
Loading…
Reference in a new issue