1
0
mirror of https://github.com/alanorth/hugo-theme-bootstrap4-blog.git synced 2024-12-19 00:52:19 +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:
Alan Orth 2017-02-21 15:03:17 +02:00
parent 7553a6f11d
commit 18863075c5
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
2 changed files with 1 additions and 17 deletions

View File

@ -2,7 +2,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
{{ partial "opengraph.html" . }} {{ partial "opengraph.html" . }}
{{ partial "twitter_cards.html" . }} {{ template "_internal/twitter_cards.html" . }}
{{- with .Site.Params.google_verify_meta -}} {{- with .Site.Params.google_verify_meta -}}
<meta name="google-site-verification" content="{{ . }}" /> <meta name="google-site-verification" content="{{ . }}" />

View File

@ -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 }}