hcz-jekyll-blog
hcz-jekyll-blog copied to clipboard
Support per-article icons/images
Right now all items on the home page are statically set to use the fa-sticky-note
icon. Instead, it would be nice if it made use of metadata inside a post, such as icon: fa-user
or image: /images/my-thumbnail.png
. Same goes for the posts-per-category view and the proposed collections-based projects.
I just did this on my branch. All you need to do is modify this line to:
<img src= {{post.image}} />
Then the YAML image tags will work fine, like the following example:
---
layout: post
title: Distributing TMB code in R packages
comments: true
catagories: TMB R c++
image: https://upload.wikimedia.org/wikipedia/commons/thumb/1/1b/R_logo.svg/724px-R_logo.svg.png
---