Improve description meta tag.
This commit is contained in:
parent
dc69feb0d5
commit
1994fe787a
1 changed files with 10 additions and 4 deletions
|
|
@ -2,7 +2,11 @@
|
|||
<link rel="{{ .Rel }}" {{ printf "type=%q" .MediaType.Type | safeHTMLAttr }} title="{{ .Name }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end -}}
|
||||
<meta name="view-transition" content="same-origin">
|
||||
<meta name="description" content="{{ with (.Description | default (replaceRE "\n" " " (.Plain | truncate 170))) }}{{ . }}{{ end }}">
|
||||
{{ if .IsHome -}}
|
||||
{{ with $.Param "description" }}<meta name="description" content="{{ . }}">{{ end }}
|
||||
{{ else -}}
|
||||
{{ with .Description }}<meta name="description" content="{{ . }}">{{ end }}
|
||||
{{ end -}}
|
||||
<meta name="created" {{ printf "content=%q" (.Date.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
|
||||
<meta name="modified" {{ printf "content=%q" (.Lastmod.Format "2006-01-02T15:04:05-0700") | safeHTMLAttr }}>
|
||||
{{ with .Params.author | default site.Params.author.name }}<meta name="author" content="{{ . }}">{{ end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue