Added thumbnail support for blog posts (#1371)

Implemented #425 based on given code.


![image](https://user-images.githubusercontent.com/31376482/234644266-07c1aebd-6a83-482f-8ac2-846fe5c0653d.png)

---------

Signed-off-by: George Araujo <george.gcac@gmail.com>
This commit is contained in:
George 2023-05-01 13:27:33 -03:00 committed by GitHub
parent ecfb9aad99
commit d98eafb424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -5,6 +5,7 @@ date: 2015-05-15 21:01:00
description: this is what included images could look like
tags: formatting images
categories: sample-posts
thumbnail: assets/img/9.jpg
---
This is an example post with image galleries.

View File

@ -53,7 +53,11 @@ pagination:
{% assign categories = post.categories | join: "" %}
<li>
<h3>
{%- if post.thumbnail -%}
<div class="row">
<div class="col-sm-9">
{%- endif -%}
<h3>
{% if post.redirect == blank %}
<a class="post-title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
{% else %}
@ -95,6 +99,13 @@ pagination:
{% endfor %}
{% endif %}
</p>
{%- if post.thumbnail -%}
</div>
<div class="col-sm-3">
<img class="card-img" src="{{post.thumbnail | relative_url}}" style="object-fit: cover; height: 90%" alt="image">
</div>
</div>
{%- endif -%}
</li>
{% endfor %}