Skip to content

Commit

Permalink
Merge pull request #77 from daviddarnes/fix-75
Browse files Browse the repository at this point in the history
Account for multiple categories as well as singular
  • Loading branch information
daviddarnes authored Dec 31, 2017
2 parents 46c007f + ae716da commit d5aed5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion _includes/post-meta.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
{% if page.categories %}
{% capture categories %}
{% for category in page.categories %}
<span class="label label--category"><a href="{{ site.baseurl }}/categories#{{ category | downcase }}">{{ category }}</a></span>{% if forloop.last == false %},{% endif %}
{% endfor %}
{% endcapture %}
{% elsif page.category %}
{% capture categories %}
<span class="label label--category"><a href="{{ site.baseurl }}/categories#{{ page.category | downcase }}">{{ page.category }}</a></span>
{% endcapture %}
{% endif %}

<small class="small post-meta">
{% if page.category %}<span class="label label--category"><a href="{{ site.baseurl }}/categories#{{ page.category | downcase }}">{{ page.category }}</a></span>&nbsp;&nbsp;&middot;&nbsp;&nbsp;{% endif %}<time datetime="{{ page.date | date_to_xmlschema }}" class="time">{{ page.date | date_to_string }}</time>
{{ categories | append: "&nbsp;&middot;&nbsp;" }}<time datetime="{{ page.date | date_to_xmlschema }}" class="time">{{ page.date | date_to_string }}</time>
</small>
2 changes: 1 addition & 1 deletion alembic-jekyll-theme.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "alembic-jekyll-theme"
spec.version = "2.3"
spec.version = "2.3.1"
spec.authors = ["David Darnes"]
spec.email = ["me@daviddarnes.com"]

Expand Down

0 comments on commit d5aed5f

Please sign in to comment.