mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-07-05 19:47:30 -05:00
Remove redundant twitter tags since they falls back to opengraph
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
{{/* we do not need to duplicate what's already covered by OpenGraph tags
|
||||||
|
* see: https://demo.bbaovanc.com/test/remove-twitter-tags/blog/swapfile-guide/
|
||||||
|
* so, no twitter:image/title/description
|
||||||
|
*/}}
|
||||||
{{ $images := $.Resources.ByType "image" }}
|
{{ $images := $.Resources.ByType "image" }}
|
||||||
{{ $featured := $images.GetMatch "*feature*" }}
|
{{ $featured := $images.GetMatch "*feature*" }}
|
||||||
{{ if not $featured }}
|
{{ if not $featured }}
|
||||||
@ -17,13 +21,10 @@
|
|||||||
{{ else }}
|
{{ else }}
|
||||||
<meta name="twitter:card" content="summary">
|
<meta name="twitter:card" content="summary">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ else }}
|
||||||
<meta name="twitter:image" content="{{ $featured.Permalink }}">
|
<meta name="twitter:card" content="summary">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<meta name="twitter:title" content="{{ .Title | plainify }}">
|
|
||||||
<meta name="twitter:description" content="{{ (partial "seo-description.html" .) | plainify }}">
|
|
||||||
|
|
||||||
{{ with .Site.Params.social.twitter }}
|
{{ with .Site.Params.social.twitter }}
|
||||||
<meta name="twitter:site" content="@{{ . }}">
|
<meta name="twitter:site" content="@{{ . }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
Reference in New Issue
Block a user