Skip to content

Commit

Permalink
Updated All
Browse files Browse the repository at this point in the history
  • Loading branch information
rsmoz committed Feb 17, 2016
1 parent e3c796e commit 1f8857c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 3 deletions.
3 changes: 3 additions & 0 deletions _data/tags.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- slug: logic
name: Logic

10 changes: 10 additions & 0 deletions _layouts/blog_by_tag
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<h1>Packages by tag :{{ page.tag }}</h1>
<div>
{% if site.tags[page.tag] %}
{% for post in site.tags[page.tag] %}
<a href="{{ post.url }}/">{{ post.title }}</a>
{% endfor %}
{% else %}
<p>There are no posts for this tag.</p>
{% endif %}
</div>
20 changes: 19 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,27 @@
layout: default
---

{% assign post = page %}
{% if post.tags.size > 0 %}
{% capture tags_content %}Posted with {% if post.tags.size == 1 %}<i class="fa fa-tag"></i>{% else %}<i class="fa fa-tags"></i>{% endif %}: {% endcapture %}
{% for post_tag in post.tags %}
{% for data_tag in site.data.tags %}
{% if data_tag.slug == post_tag %}
{% assign tag = data_tag %}
{% endif %}
{% endfor %}
{% if tag %}
{% capture tags_content_temp %}{{ tags_content }}<a href="/tag/{{ tag.slug }}/">{{ tag.name }}</a>{% if forloop.last == false %}, {% endif %}{% endcapture %}
{% assign tags_content = tags_content_temp %}
{% endif %}
{% endfor %}
{% else %}
{% assign tags_content = '' %}
{% endif %}

<article class="post">
<h1>{{ page.title }}</h1>

<p id="post-meta">{{ tags_content }}</p>
<div class="entry">
{{ content }}
</div>
Expand Down
1 change: 1 addition & 0 deletions _posts/2016-02-17-Axiomatic.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ layout: post
title: Axiomatic
post_author: Jaden Geller
package_url: https://github.com/JadenGeller/Axiomatic
tags: [logic]
---

Unification framework for logic programming.
Expand Down
3 changes: 1 addition & 2 deletions all.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ <h2>All Packages</h2>
{% for post in sorted_all %}
<article class="post">

<h3><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></h3>

<h3><a href="{{ post.package_url }}">{{ post.title }}</a><span style="font-size:0.8em"> By {{ post.post_author }}</span></h3>
<div class="entry">
{{ post.excerpt }}
</div>
Expand Down

0 comments on commit 1f8857c

Please sign in to comment.