mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-17 13:25:57 -06:00
Use description-or-summary partial in SEO tags
This commit is contained in:
parent
502fc36b0d
commit
f9e7eeeaa6
@ -1,5 +1,9 @@
|
||||
{{ with .Description }}
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{ else }}
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{- with .Description -}}
|
||||
<p>{{- . | markdownify -}}</p>
|
||||
{{- else -}}
|
||||
{{- with .Summary -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
{{- .Site.Params.description -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
@ -33,5 +33,5 @@
|
||||
{{ partial "seo-tags/author.html" . }}
|
||||
|
||||
<meta name="language" content="{{ .Language.Lang }}">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
<meta name="description" content="{{ (partial "description-or-summary.html" .) | plainify }}">
|
||||
</head>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<meta property="og:title" content="{{ .Title | plainify }}">
|
||||
<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary | plainify }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
<meta property="og:description" content="{{ (partial "description-or-summary.html" .) | plainify }}">
|
||||
<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<meta itemprop="name" content="{{ .Title | plainify }}">
|
||||
<meta itemprop="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary | plainify }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
<meta itemprop="description" content="{{ (partial "description-or-summary.html" .) | plainify }}">
|
||||
|
||||
{{ $format := "2006-01-02T15:04:05-07:00" }}
|
||||
{{ with .Date }}
|
||||
|
@ -22,7 +22,7 @@
|
||||
{{ end }}
|
||||
|
||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary | plainify }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}">
|
||||
<meta name="twitter:description" content="{{ (partial "description-or-summary.html" .) | plainify }}">
|
||||
|
||||
{{ with .Site.Social.twitter }}
|
||||
<meta name="twitter:site" content="@{{ . }}">
|
||||
|
Loading…
Reference in New Issue
Block a user