Add support for Twitter's 'summary_large_image' (#668)
This commit is contained in:
parent
45ef2fc8c0
commit
23322c281f
@ -4,6 +4,7 @@
|
|||||||
- Add social network link: Mastodon (#646)
|
- Add social network link: Mastodon (#646)
|
||||||
- Add support for sharing pages on new social network: VK (#657)
|
- Add support for sharing pages on new social network: VK (#657)
|
||||||
- Use Open Graph type 'article' for blog posts (#669)
|
- Use Open Graph type 'article' for blog posts (#669)
|
||||||
|
- Use Twitter's `summary_large_image` card when `share-img` is specified (#668)
|
||||||
|
|
||||||
## v3.0.0 2020-05-07
|
## v3.0.0 2020-05-07
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ Parameter | Description
|
|||||||
readtime | If you want a post to show how many minutes it will take to read it, use `readtime: true`.
|
readtime | If you want a post to show how many minutes it will take to read it, use `readtime: true`.
|
||||||
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`.
|
show-avatar | If you have an avatar configured in the `_config.yml` but you want to turn it off on a specific page, use `show-avatar: false`.
|
||||||
image | If you want to add an image to your blog post that will show up next to the post's excerpt on the feed and in the post page itself, use `image: /path/to/img`.
|
image | If you want to add an image to your blog post that will show up next to the post's excerpt on the feed and in the post page itself, use `image: /path/to/img`.
|
||||||
share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's full URL here.
|
share-img | If you want to specify an image to use when sharing the page on Facebook or Twitter, then provide the image's path or full URL here.
|
||||||
social-share | By default, every blog post has buttons to share the page on social media. If you want to turn this feature off, use `social-share: false`.
|
social-share | By default, every blog post has buttons to share the page on social media. If you want to turn this feature off, use `social-share: false`.
|
||||||
nav-short | By default, the navigation bar gets shorter after scrolling down the page. If you want the navigation bar to always be short on a certain page, use `nav-short: true`
|
nav-short | By default, the navigation bar gets shorter after scrolling down the page. If you want the navigation bar to always be short on a certain page, use `nav-short: true`
|
||||||
gh-repo | If you want to show GitHub buttons at the top of a post, this sets the GitHub repo name (eg. `daattali/beautiful-jekyll`). You must also use the `gh-badge` parameter to specify what buttons to show.
|
gh-repo | If you want to show GitHub buttons at the top of a post, this sets the GitHub repo name (eg. `daattali/beautiful-jekyll`). You must also use the `gh-badge` parameter to specify what buttons to show.
|
||||||
|
@ -81,14 +81,18 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.share-img %}
|
{% if page.share-img %}
|
||||||
<meta property="og:image" content="{{ page.share-img }}">
|
<meta property="og:image" content="{{ page.share-img | absolute_url }}">
|
||||||
{% elsif site.avatar %}
|
{% elsif site.avatar %}
|
||||||
<meta property="og:image" content="{{ site.avatar | absolute_url }}">
|
<meta property="og:image" content="{{ site.avatar | absolute_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
<!-- Twitter summary cards -->
|
<!-- Twitter summary cards -->
|
||||||
|
{% if page.share-img %}
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
{% else %}
|
||||||
<meta name="twitter:card" content="summary">
|
<meta name="twitter:card" content="summary">
|
||||||
|
{% endif %}
|
||||||
<meta name="twitter:site" content="@{{ site.social-network-links.twitter }}">
|
<meta name="twitter:site" content="@{{ site.social-network-links.twitter }}">
|
||||||
<meta name="twitter:creator" content="@{{ site.social-network-links.twitter }}">
|
<meta name="twitter:creator" content="@{{ site.social-network-links.twitter }}">
|
||||||
|
|
||||||
@ -109,7 +113,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.share-img %}
|
{% if page.share-img %}
|
||||||
<meta name="twitter:image" content="{{ page.share-img }}">
|
<meta name="twitter:image" content="{{ page.share-img | absolute_url }}">
|
||||||
{% elsif site.avatar %}
|
{% elsif site.avatar %}
|
||||||
<meta name="twitter:image" content="{{ site.avatar | absolute_url }}">
|
<meta name="twitter:image" content="{{ site.avatar | absolute_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -3,6 +3,7 @@ layout: post
|
|||||||
title: Flake it till you make it
|
title: Flake it till you make it
|
||||||
subtitle: Excerpt from Soulshaping by Jeff Brown
|
subtitle: Excerpt from Soulshaping by Jeff Brown
|
||||||
cover-img: /assets/img/path.jpg
|
cover-img: /assets/img/path.jpg
|
||||||
|
share-img: /assets/img/path.jpg
|
||||||
tags: [books, test]
|
tags: [books, test]
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user