Add category to rake new_post

This commit is contained in:
Michael Rose
2014-02-27 15:00:37 -05:00
parent 938c653c71
commit 0cdcde10bf
5 changed files with 6 additions and 20 deletions

View File

@ -40,23 +40,15 @@
</div><!-- /#main -->
<div class="footer-wrap">
{% if site.related_posts.size > 0 %}<div class="related-articles">
<div class="related-articles">
<h4>You might also enjoy <small class="pull-right">(<a href="{{ site.url }}/posts/">View all posts</a>)</small></h4>
<ul>
{% for post in site.related_posts limit:3 %}
{% assign match = false %}
{% for category in post.categories %}
{% if page.categories contains category %}
{% assign match = true %}
{% endif %}
{% endfor %}
{% if match %}
<li><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
<hr />
</div><!-- /.related-articles -->{% endif %}
</div><!-- /.related-articles -->
<footer>
{% include _footer.html %}
</footer>