Fixes #132 (Commit from @bgoldman)

This commit is contained in:
Brandon Goldman 2016-02-22 18:32:53 -08:00 committed by Panos Sakkos
parent 85fdf5b510
commit 5b589baa73
9 changed files with 119 additions and 8 deletions

40
_layouts/category.html Normal file
View file

@ -0,0 +1,40 @@
<!-- Category Layout Start -->
<!DOCTYPE html>
<html lang="{{ site.lang }}">
{% include head.html %}
<body>
{% include navigation.html %}
<section class="container content-section text-center">
<div class="row">
<div class="col-md-10 col-md-offset-1 col-xs-10 col-xs-offset-1">
{% assign category = page.title %}
<h3 id="#{{ category }}">Category: {{ category }}</h3>
<div>
{% for post in site.posts %}
{% if post.category == category %}
{% include post-list.html%}
{% endif %}
{% endfor %}
</div>
</div>
</div>
</section>
{% include footer.html %}
{% include js.html %}
</body>
</html>
<!-- Category Layout End -->

View file

@ -17,11 +17,18 @@
{% include swipe-instructions.html %}
<h1><strong>{{ page.title }}</strong></h1>
<h4><strong>{{ page.date | date_to_string }}</strong>
<small> . {{ page.category }} . <a href="{{site.baseurl}}{{page.url }}#disqus_thread">Comments</a>
{% for tag in page.tags %}
<a href="{{site.baseurl}}/tags/{{tag}}.html">#{{ tag }}</a>
{% endfor %}
<h4>
<strong>{{ page.date | date_to_string }}</strong>
<small>
. category:
<a class="category" href="{{site.baseurl}}/categories/{{page.category | downcase}}.html">
{{ page.category }}
</a>.
<a href="{{site.baseurl}}{{page.url }}#disqus_thread">Comments</a>
<br />
{% for tag in page.tags %}
<a class="tag" href="{{site.baseurl}}/tags/{{tag}}.html">#{{ tag }}</a>
{% endfor %}
</small>
</h4>