replace 'image' YAML param with 'thumbnail-img' and don't use the thumbnail as the page avatar

This commit is contained in:
Dean Attali 2020-07-05 05:18:31 +00:00
parent 43809d04ae
commit 70f7345a29
4 changed files with 5 additions and 13 deletions

View File

@ -140,7 +140,7 @@ Parameter | Description
----------- | -----------
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`.
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`.
thumbnail-img | For blog posts, if you want to add a thumbnail that'll show up next to the post's excerpt in the feed, use `thumbnail-img: /path/to/image`.
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`.
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`

View File

@ -33,15 +33,7 @@
</ul>
</div>
{% if page.image and (layout.show-avatar or page.show-avatar) %}
<div class="avatar-container">
<div class="avatar-img-border">
<a href="{{ '' | absolute_url }}">
<img alt="Navbar avatar" class="avatar-img" src="{{ page.image | relative_url }}" />
</a>
</div>
</div>
{% elsif site.avatar and (layout.show-avatar or page.show-avatar) %}
{% if site.avatar and (layout.show-avatar or page.show-avatar) %}
<div class="avatar-container">
<div class="avatar-img-border">
<a href="{{ '' | absolute_url }}">

View File

@ -25,10 +25,10 @@ layout: page
</p>
<div class="post-entry-container">
{% if post.image %}
{% if post.thumbnail-img %}
<div class="post-image">
<a href="{{ post.url | relative_url }}">
<img src="{{ post.image | relative_url }}">
<img src="{{ post.thumbnail-img | relative_url }}">
</a>
</div>
{% endif %}

View File

@ -3,7 +3,7 @@ layout: post
title: Flake it till you make it
subtitle: Excerpt from Soulshaping by Jeff Brown
cover-img: /assets/img/path.jpg
image: /assets/img/path.jpg
thumbnail-img: /assets/img/path.jpg
share-img: /assets/img/path.jpg
tags: [books, test]
---