This commit is contained in:
Pete 2016-07-27 15:19:16 -05:00
parent c09fefc22a
commit b90c1c8de9
8 changed files with 125 additions and 3 deletions

View file

@ -8,6 +8,14 @@ layout: base
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<article role="main" class="blog-post">
{% if page.tags.size > 0 %}
<div class="blog-tags">
Tags:
{% for tag in page.tags %}
<a class="tag_list_link" href="/tag/{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
{% endif %}
{{ content }}
</article>

42
_layouts/tag_index.html Normal file
View file

@ -0,0 +1,42 @@
---
layout: default
show-avatar: false
---
<h2 class="post_title">{{page.title}}:</h2>
<div class="posts-list">
{% for post in site.posts %}
{% for tag in post.tags %}
{% if tag == page.tag %}
<article class="post-preview">
<a href="{{ post.url | prepend: site.baseurl }}">
<h3 class="post-title">{{ post.title }}</h3>
{% if post.subtitle %}
<h4 class="post-subtitle">
{{ post.subtitle }}
</h4>
{% endif %}
</a>
<p class="post-meta">
Posted on {{ post.date | date: "%B %-d, %Y" }}
</p>
<div class="post-entry">
{{ post.content | strip_html | xml_escape | truncatewords: 50 }}
<a href="{{ post.url | prepend: site.baseurl }}" class="post-read-more">[Read&nbsp;More]</a>
</div>
<div class="blog-tags">
Tags:
{% for tag in post.tags %}
<a href="/tag/{{ tag }}">{{ tag }}</a>
{% endfor %}
</div>
</article>
{% endif %}
{% endfor %}
{% endfor %}
</div>