浏览代码

Merge pull request #127 from zlargon/thumbnail-image-url-incorrect

[bug fix] thumbnail refer to incorrect image url when site is put in a subdirectory
Ruipeng Zhang 9 年之前
父节点
当前提交
3abd31f31b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      layout/common/thumbnail.ejs

+ 2 - 2
layout/common/thumbnail.ejs

@@ -1,8 +1,8 @@
 <a href="<%- url_for((post.link ? post.link : post.path)) %>" class="thumbnail">
     <% var thumbnailUrl = thumbnail(post) %>
     <% if (thumbnailUrl) { %>
-        <span style="background-image:url(<%- url_for(thumbnailUrl) %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
+        <span style="background-image:url(<%= thumbnailUrl %>)" alt="<%= post.title %>" class="thumbnail-image"></span>
     <% } else { %>
         <span class="thumbnail-image thumbnail-none"></span>
     <% } %>
-</a>
+</a>