From 643c2dbb06e99e876b4e1a62c922f117b64e1c14 Mon Sep 17 00:00:00 2001 From: Chris Blyth Date: Thu, 3 May 2018 01:04:19 +0100 Subject: [PATCH] Configure default Twitter summary card type (V2) (#225) Merge pull request 225 --- docs/usage.md | 10 ++++++++-- lib/template.html | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/usage.md b/docs/usage.md index 868708f..48f8a6e 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -6,12 +6,16 @@ The SEO tag will respect any of the following if included in your site's `_confi * `description` - A short description (e.g., A blog dedicated to reviewing cat gifs) * `url` - The full URL to your site. Note: `site.github.url` will be used by default. * `author` - global author information (see [Advanced usage](advanced-usage.md#author-information)) -* `twitter:username` - The site's Twitter handle. You'll want to describe it like so: + +* `twitter` - The following properties are available: + * `twitter:card` - The site's default card type + * `twitter:username` - The site's Twitter handle. You'll want to describe it like so: ```yml twitter: username: benbalter - ``` +    card: summary +  ``` * `facebook` - The following properties are available: * `facebook:app_id` - a Facebook app ID for Facebook insights @@ -66,3 +70,5 @@ The SEO tag will respect the following YAML front matter if included in a post, * `image` - URL to an image associated with the post, page, or document (e.g., `/assets/page-pic.jpg`) * `author` - Page-, post-, or document-specific author information (see [Advanced usage](advanced-usage.md#author-information)) * `lang` - Page-, post-, or document-specific language information + +*Note:* Front matter defaults can be used for any of the above values as described in advanced usage with an image example. diff --git a/lib/template.html b/lib/template.html index eabfbd4..c2dffef 100755 --- a/lib/template.html +++ b/lib/template.html @@ -53,7 +53,7 @@ {% if site.twitter %} {% if seo_tag.image %} - + {% else %} {% endif %}