layout: default
<div class=“home”>
{%- if page.title -%} <h1 class="page-heading">{{ page.title }}</h1> {%- endif -%}
{%- assign posts_by_month = site.posts | group_by_exp: “item”, “item.date | truncate: 7, ''” -%}
{%- if posts_by_month.size > 0 -%} <h2 class="post-list-heading">{{ page.list_title | default: "Posts" }}</h2> <ul class="post-list"> {%- for month in posts_by_month -%} <li> <h3>{{ month | append: "-01" | date: "%B %Y" }}</h3> <ul class="post-list"> {%- for post in month.items -%} <li> <a class="post-link" href="{{ post.url | relative_url }}"> {{ post.title | escape }} </a> </li> {%- endfor -%} </ul> </li> {%- endfor -%} </ul> <p class="feed-subscribe"> <a href="{{ 'feed.xml' | relative_url }}"> <span>Subscribe to our feed</span> </a> </p> {%- endif -%}
</div>