Skip to content

Commit

Permalink
Make cover image option in Twitter card
Browse files Browse the repository at this point in the history
Without a configuration setting for 'cover', the `twitter_card.html`
partial fails to render, and throws errors during site build.
  • Loading branch information
jramnani committed Oct 15, 2017
1 parent 39eeecd commit 4172636
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions layouts/partials/twitter_card.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
{{ end }}
{{ else }}
<meta name="twitter:card" content="summary"/>
{{ with .Site.Params.cover }}
<meta name="twitter:image" content="{{ .Site.Params.cover | relURL }}"/>
{{ end }}
{{ end }}

<!-- Twitter Card data -->
Expand Down

0 comments on commit 4172636

Please sign in to comment.