aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/jekyll-theme/sidebar/latest-posts.html
blob: a2ac843c239dac686f251125335c9f158e99a0a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{% unless site.settings.sidebar.latest_posts.hide or page.sidebar.latest_posts.hide %}
{% if site.posts.size > 0 %}

{% capture latest_posts_content %}
<div class="list-group wide-enough">
  <div class="list-group-item disabled">
    <h4 class="list-group-item-heading">latest posts</h4>
  </div>
  {% for post in site.posts limit: 5 %}
  <a class="list-group-item" href="{{ post.url | relative_url }}">
    <h5 class="list-group-item-heading post-header">
      <span>{{ post.title }}</span>
      <small><span class="glyphicon glyphicon-time"></span>&nbsp;{{ post.date | date: '%-d %b %Y' }}</small>
    </h5>
  </a>
  {% endfor %}
</div>
{% endcapture %}

{% include jekyll-theme/sidebar/entry.html content=latest_posts_content %}

{% endif %}
{% endunless %}