mirror of
https://github.com/alanorth/hugo-theme-bootstrap4-blog.git
synced 2024-11-17 09:47:05 +01:00
Revert to Hugo's own Twitter Cards partial
I had overridden it in the theme to improve the metadata generated by it. Hugo has accepted the changes upstream so we can use theirs now. See: https://github.com/spf13/hugo/pull/2984
This commit is contained in:
parent
7553a6f11d
commit
18863075c5
@ -2,7 +2,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
||||
{{ partial "opengraph.html" . }}
|
||||
{{ partial "twitter_cards.html" . }}
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
{{- with .Site.Params.google_verify_meta -}}
|
||||
<meta name="google-site-verification" content="{{ . }}" />
|
||||
|
@ -1,16 +0,0 @@
|
||||
{{ if .IsPage }}
|
||||
{{ with .Params.images }}
|
||||
<!-- Twitter summary card with large image must be at least 280x150px -->
|
||||
<meta name="twitter:card" content="summary_large_image"/>
|
||||
<meta name="twitter:image:src" content="{{ index . 0 | absURL }}"/>
|
||||
{{ else }}
|
||||
<meta name="twitter:card" content="summary"/>
|
||||
{{ end }}
|
||||
|
||||
<!-- Twitter Card data -->
|
||||
<meta name="twitter:title" content="{{ .Title }}"/>
|
||||
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
|
||||
{{ with .Site.Social.twitter }}<meta name="twitter:site" content="@{{ . }}"/>{{ end }}
|
||||
{{ range .Site.Authors }}
|
||||
{{ with .twitter }}<meta name="twitter:creator" content="@{{ . }}"/>{{ end }}
|
||||
{{ end }}{{ end }}
|
Loading…
Reference in New Issue
Block a user