diff --git a/layout/_partial/post/thumbnail.ejs b/layout/_partial/post/thumbnail.ejs index 8682885..b53b0e4 100644 --- a/layout/_partial/post/thumbnail.ejs +++ b/layout/_partial/post/thumbnail.ejs @@ -1,14 +1,16 @@ <% var s = ""; - + if (post.thumbnail){ s = post.thumbnail; }else if (post.banner){ s = post.banner; + }else if (post.photos && post.photos.length){ + s = post.photos[0]; }else{ var img=/\/ig; - var result = post.content.match(img); + var result = post.content.match(img); result = img.exec(post.content); if(result != null) { for(var i = result.length -1; i; --i){