mirror of
https://github.com/MinimalBible/MinimalBible.github.io
synced 2024-12-21 06:08:19 -05:00
Group all posts by year
This commit is contained in:
parent
31b07c1f55
commit
d0bf3106c8
34
posts.html
34
posts.html
@ -6,17 +6,27 @@ description: "An archive of posts."
|
|||||||
---
|
---
|
||||||
|
|
||||||
{% for post in site.posts %}
|
{% for post in site.posts %}
|
||||||
<article class="hentry">
|
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
|
||||||
<header>
|
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
|
||||||
<div class="entry-meta"><span class="entry-date date published"><time datetime="{{ post.date | date_to_xmlschema }}"><a href="{{ site.url }}{{ post.url }}">{{ post.date | date: "%B %d, %Y" }}</a></time></span><span class="author vcard fn"><a class="url fn" href="{{ site.url }}">{{ site.owner.name }}</a></span>{% if site.disqus_shortname and post.comments %} • <span class="entry-comments"><a href="{{ site.url }}{{ post.url }}#disqus_thread">Comment</a></span>{% endif %}</div><!-- /.entry-meta -->
|
|
||||||
{% if post.link %}
|
{% if forloop.first %}
|
||||||
<h1 class="entry-title"><a href="{{ site.url }}{{ post.url }}" rel="bookmark" title="{{ post.title }}"><i class="icon-double-angle-right"></i></a> <a href="{{ post.link }}">{{ post.title }}</a></h1>
|
<article>
|
||||||
{% else %}
|
<h2 id="{{ this_year }}-ref">{{ this_year }}</h2>
|
||||||
<h1 class="entry-title"><a href="{{ site.url }}{{ post.url }}" rel="bookmark" title="{{ post.title }}">{{ post.title }}</a></h1>
|
<ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<li class="entry-title"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a></li>
|
||||||
|
|
||||||
|
{% if forloop.last %}
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
{% else %}
|
||||||
|
{% if this_year != next_year %}
|
||||||
|
</ul>
|
||||||
|
</article>
|
||||||
|
<article>
|
||||||
|
<h2 id="{{ next_year }}-ref">{{next_year}}</h2>
|
||||||
|
<ul>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</header>
|
|
||||||
<div class="entry-content">
|
|
||||||
<p>{% if post.description %}{{ post.description }}{% else %}{{ post.content | strip_html | strip_newlines | truncate: 120 }}{% endif %} <a href="{{ site.url }}{{ post.url }}">Continue reading</a></p>
|
|
||||||
</div><!-- /.entry-content -->
|
|
||||||
</article><!-- /.hentry -->
|
|
||||||
{% endfor %}
|
{% endfor %}
|
@ -20,7 +20,7 @@ description: "An archive of posts sorted by tag."
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{% for tag in site.tags %}
|
{% for tag in site.tags %}
|
||||||
<article class="hentry">
|
<article>
|
||||||
<h2 id="{{ tag[0] }}">{{ tag[0] }}</h2>
|
<h2 id="{{ tag[0] }}">{{ tag[0] }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{% assign pages_list = tag[1] %}
|
{% assign pages_list = tag[1] %}
|
||||||
|
Loading…
Reference in New Issue
Block a user