aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/_includes/jekyll-theme/sidebar/latest-posts.html
blob: 259656959dba52e177a892fe71339a8a52e86106 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{% 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">
  {% for post in site.posts limit: 5 %}
  <a class="list-group-item" href="{{ post.url | relative_url }}">
    <span class="badge"><span class="glyphicon glyphicon-time"></span>&nbsp;{{ post.date | date: '%-d %b %Y' }}</span>
    <span class="glyphicon glyphicon-file"></span>&nbsp;{{ post.title }}
  </a>
  {% endfor %}
</div>
{% endcapture %}

{% include jekyll-theme/sidebar/entry.html header='Latest posts' content=latest_posts_content %}

{% endif %}
{% endunless %}