|
13 | 13 | {{ site.title | escape }}
|
14 | 14 | {% endif %}
|
15 | 15 | {% endcapture %}
|
| 16 | + |
| 17 | +{% if page.path contains 'books' %} |
| 18 | + <!-- Twitter card image for books --> |
| 19 | + {% capture slugTitle %}{{ page.title | slugify }}{% endcapture %} |
| 20 | + {% capture folderPath %}/assets/images/bitcoin/books{% endcapture %} |
| 21 | + {% capture cardImageUrl %}{{ folderPath }}/jpg/{{ slugTitle }}.jpg{% endcapture %} |
| 22 | + |
| 23 | + <!-- Description for twitter card --> |
| 24 | + {% capture cardAuthors %}{{ page.authors | join: " and " }}{% endcapture %} |
| 25 | + {% capture cardDescription %}Book by {{ cardAuthors }}{% endcapture %} |
| 26 | +{% endif %} |
| 27 | + |
16 | 28 | <title>{{ fullTitle }}</title>
|
17 | 29 | <meta name="description" content="{{ site.description }}">
|
18 | 30 |
|
|
25 | 37 | <meta property="og:title" content="{{ fullTitle }}">
|
26 | 38 | <meta property="og:site_name" content="{{ site.title }}">
|
27 | 39 | <meta property="og:description" content="{% if page.description %}{{ page.description | escape }}{% else %}{{ site.description }}{% endif %}">
|
28 |
| -<meta property="og:image" content="{% if page.image %}{{ page.image | absolute_url }}{% else %}{{ site.default_img | absolute_url }}{% endif %}"> |
29 |
| - |
30 |
| - |
31 |
| -{% if page.path contains 'books' %} |
32 |
| - <!-- Twitter card image for books --> |
33 |
| - {% capture slugTitle %}{{ page.title | slugify }}{% endcapture %} |
34 |
| - {% capture folderPath %}/assets/images/bitcoin/books{% endcapture %} |
35 |
| - {% capture cardImageUrl %}{{ folderPath }}/jpg/{{ slugTitle }}.jpg{% endcapture %} |
36 |
| - |
37 |
| - <!-- Description for twitter card --> |
38 |
| - {% capture cardAuthors %}{{ page.authors | join: " and " }}{% endcapture %} |
39 |
| - {% capture cardDescription %}Book by {{ cardAuthors }}{% endcapture %} |
40 |
| -{% endif %} |
| 40 | +<meta property="og:image" content="{% if page.image %}{{ page.image | absolute_url }}{% elsif cardImageUrl%}{{ cardImageUrl | absolute_url }}{% else %}{{ site.default_img | absolute_url }}{% endif %}"> |
41 | 41 |
|
42 | 42 | <!-- Twitter cards -->
|
43 | 43 | <meta name="twitter:site" content="@{{ site.title }}">
|
|
0 commit comments