diff --git a/README.md b/README.md index f640d38..3f40807 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ Parameter | Description title | Page or blog post title subtitle | Short description of page or blog post that goes under the title tags | List of tags to categorize the post. Separate the tags with commas and place them inside square brackets. Example: `[personal, analysis, finance]` -cover-img | Include a large full-width image at the top of the page. You can either give the path to a single image, or provide a list of images to cycle through (see [my personal website](https://deanattali.com/) as an example). +cover-img | Include a large full-width image at the top of the page. You can either provide the path to a single image (eg. `"/path/to/img"`) , or a list of images to cycle through (eg. `["/path/img1", "/path/img2"]`). The first image will also be used as the thumbnail in the feed page. If you want to add a caption to an image, then the image should be provided as `{"/path/to/img" : "Caption of image"}`. comments | If you want do add comments to a specific page, use `comments: true`. Comments only work if you enable one of the comments providers (Facebook, disqus, staticman, utterances) in `_config.yml` file. Comments are automatically enabled on blog posts but not on other pages; to turn comments off for a specific post, use `comments: false`. ## Less commonly used parameters @@ -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`. -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`. +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`. You can use `thumbnail-img: ""` to disable a thumbnail. 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` diff --git a/_layouts/home.html b/_layouts/home.html index f48b20a..f77caad 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -25,10 +25,23 @@ layout: page

- {% if post.thumbnail-img %} + {%- capture thumbnail -%} + {% if post.thumbnail-img %} + {{ post.thumbnail-img }} + {% elsif post.cover-img %} + {% if post.cover-img.first %} + {{ post.cover-img[0].first.first }} + {% else %} + {{ post.cover-img }} + {% endif %} + {% else %} + {% endif %} + {% endcapture %} + {% assign thumbnail=thumbnail | strip %} + {% if thumbnail != "" %}
- +
{% endif %} diff --git a/_posts/2020-02-26-flake-it-till-you-make-it.md b/_posts/2020-02-26-flake-it-till-you-make-it.md index 2fc26f6..5c06d2a 100644 --- a/_posts/2020-02-26-flake-it-till-you-make-it.md +++ b/_posts/2020-02-26-flake-it-till-you-make-it.md @@ -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 -thumbnail-img: /assets/img/path.jpg +thumbnail-img: "/assets/img/thumb.png" share-img: /assets/img/path.jpg tags: [books, test] --- diff --git a/assets/img/thumb.png b/assets/img/thumb.png new file mode 100644 index 0000000..53118c3 Binary files /dev/null and b/assets/img/thumb.png differ