refactor(opengraph): add default value for twitter:card (#72)
This commit is contained in:
parent
d205753323
commit
25a72940b8
@ -62,7 +62,10 @@ params:
|
||||
|
||||
opengraph:
|
||||
twitter:
|
||||
# Your Twitter username
|
||||
site:
|
||||
|
||||
# Available values: summary, summary_large_image
|
||||
card: summary_large_image
|
||||
|
||||
defaultImage:
|
||||
|
@ -10,6 +10,6 @@
|
||||
|
||||
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" -}}
|
||||
{{- if $image.exists -}}
|
||||
<meta name="twitter:card" content="{{ .Site.Params.opengraph.twitter.card }}">
|
||||
<meta name="twitter:card" content="{{ default `summary_large_image` .Site.Params.opengraph.twitter.card }}">
|
||||
<meta name="twitter:image" content='{{ absURL $image.permalink }}' />
|
||||
{{- end -}}
|
Loading…
Reference in New Issue
Block a user