Skip to content

Commit

Permalink
Improved blog posts list layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ppatierno committed Feb 25, 2018
1 parent 45c1296 commit 1db6f66
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ plugins:
# - vendor/gems/
# - vendor/ruby/
excerpt_separator: <!--more-->
show_excerpts: true
29 changes: 20 additions & 9 deletions blog/index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
---
layout: default
---
<div class="home">
{% if site.posts.size > 0 %}
<ul class="post-list">
{% for post in site.posts %}
<li>
{% assign date_format = site.minima.date_format | default: "%b %-d, %Y" %}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{% if site.show_excerpts %}
{{ post.excerpt }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
</div>

<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}"><b>{{ post.title }}</b></a>
<p>({{ post.date | date_to_string }})</p>
<p>{{ post.excerpt }}</p>
</li>
{% endfor %}
</ul>

0 comments on commit 1db6f66

Please sign in to comment.