Explorar el Código

Merge pull request #94 from dapenggao/patch-2

Hide "Related Posts" section if it is empty
Mark Otto hace 10 años
padre
commit
48f632cd3b
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      _layouts/post.html

+ 2 - 0
_layouts/post.html

@@ -8,6 +8,7 @@ layout: default
   {{ content }}
 </article>
 
+{% if site.related_posts != empty %}
 <aside class="related">
   <h2>Related Posts</h2>
   <ul class="related-posts">
@@ -23,3 +24,4 @@ layout: default
     {% endfor %}
   </ul>
 </aside>
+{% endif %}