diff options
| author | Reorx <novoreorx@gmail.com> | 2022-05-05 11:36:20 +0800 |
|---|---|---|
| committer | Reorx <novoreorx@gmail.com> | 2022-05-05 11:36:20 +0800 |
| commit | 998ce46fb623fb3c6b2ad9b2e530d21f6201a928 (patch) | |
| tree | 252a45420448110cb217b04c46a9787f57fd3917 | |
| parent | 97af798ba1ff24a6eccf4b48e3cdfd2e89236a91 (diff) | |
refine twitter cards
| -rw-r--r-- | layouts/partials/head.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3411f18..d855306 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -73,12 +73,12 @@ {{- /* https://developer.twitter.com/en/docs/twitter-for-websites/cards/guides/getting-started */}} {{- if .Params.cover.image }} - <meta name="twitter:card" content="summary_large_image" /> + <meta name="twitter:card" property="twitter:card" content="summary_large_image" /> <meta name="twitter:image" content="{{ (path.Join .RelPermalink .Params.cover.image ) | absURL }}" /> <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 -}}"/> - <meta name="twitter:site" content="@novoreorx"/> - <meta name="twitter:creator" content="@novoreorx"/> + <meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}" /> + <meta name="twitter:site" content="@novoreorx" /> + <meta name="twitter:creator" content="@novoreorx" /> {{- else -}} {{- template "_internal/twitter_cards.html" . -}} {{- end -}} |
