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