Add blog share images

This commit is contained in:
Jeremy Thomas 2018-01-18 17:45:54 +00:00
parent aba1664488
commit db05b22643
16 changed files with 25 additions and 1 deletions

View File

@ -46,6 +46,9 @@
{% if page.share_description %}
<meta property="og:description" content="{{ page.share_description }}">
<meta name="twitter:description" content="{{ page.share_description }}">
{% elsif page.layout == 'post' %}
<meta property="og:description" content="{{ page.content | strip_html | truncate: 400, '…' }}">
<meta name="twitter:description" content="{{ page.content | strip_html | truncate: 400, '…' }}">
{% else %}
<meta property="og:description" content="{{ site.description }}">
<meta name="twitter:description" content="{{ site.description }}">
@ -54,6 +57,9 @@
{% if page.share_image %}
<meta property="og:image" content="{{ site.url }}{{ page.share_image }}">
<meta name="twitter:image" content="{{ site.url }}{{ page.share_image }}">
{% elsif page.layout == 'post' %}
<meta property="og:image" content="{{ site.url }}/images/blog/share/{{ page.id | slice: 12,page.id.size }}.png">
<meta name="twitter:image" content="{{ site.url }}/images/blog/share/{{ page.id | slice: 12,page.id.size }}.png">
{% else %}
<meta property="og:image" content="{{ site.url }}/images/bulma-banner.png">
<meta name="twitter:image" content="{{ site.url }}/images/bulma-banner.png">

View File

@ -37,6 +37,14 @@ route: blog
<div class="content is-medium">
{{ content }}
</div>
<nav class="pagination is-centered" role="navigation" aria-label="pagination">
{% if page.previous.url %}
<a class="pagination-previous" href="{{ page.previous.url }}">Previous post</a>
{% endif %}
{% if page.next.url %}
<a class="pagination-next" href="{{ page.next.url }}">Next post</a>
{% endif %}
</nav>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
---
title: "Bulma is on Patreon!"
layout: post
introduction: "Fix your navbar at the top or bottom"
introduction: "Support Bulma's future"
color: "primary"
name: "Bulma on Patreon"
icon: "patreon"

View File

@ -91,6 +91,10 @@
&.is-single
margin-bottom: 2rem
width: 100%
&.is-share
height: 315px
margin: 2rem auto
width: 600px
.bd-article-overlay
+overlay

View File

@ -11775,6 +11775,12 @@ svg {
width: 100%;
}
.bd-article-image.is-share {
height: 315px;
margin: 2rem auto;
width: 600px;
}
.bd-article-overlay {
bottom: 0;
left: 0;

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB