iTimeTraveler / hexo-theme-hipaper

A fashional newspaper theme for Hexo.
https://itimetraveler.github.io/hexo-theme-hipaper/
MIT License
254 stars 75 forks source link

Thumbnails on main page not showing up? #7

Closed mvxt closed 7 years ago

mvxt commented 7 years ago

Hello,

This is a great theme and I'm loving it. Thank you for sharing. I noticed in your preview example that in your "Recent Posts" module, there are small thumbnails next to your article post names. Mine are not showing up for whatever reason (see attached image below). How are you achieving this?

screenshot from 2017-02-05 22-55-03

Best, M

iTimeTraveler commented 7 years ago

Hi, @mvxt

You can refer to my hexo source: https://github.com/iTimeTraveler/hexo-theme-hiero/tree/site-source

this is a header of example post markdown file:

---
title: Hillary Clinton Calls for Unity in Concession Speech
date: 2016-11-10 09:55:37
comments: true
categories:
    - LifeStyle
photos: 
    - https://hillaryclintonspeeches.files.wordpress.com/2016/11/10clinton2-master768.jpg
---

the photos field is the thumbnail that will be shown on Recent Posts widget. Thank you for your interest :smiley: .

mvxt commented 7 years ago

Thanks, works perfectly!

kiarafbickers commented 6 years ago

Looking to remove the photo from the main post, but keep the thumbnail.

Removing this line from article.ejs, failed to produce the desired functionality.

<div class="entry-thumbnail">
    <a href="<%- url_for(post.path) %>"><img src="<%= post.photos[0] %>" class="attachment-thumb-featured size-thumb-featured wp-post-image" alt=""></a>
</div>

Any ideas?

mvxt commented 6 years ago

@kiarafrobles I actually did the same thing to my articles. Remove line 3 from /layout/_partial/article.ejs.

3    <%- partial('post/gallery') %>