1
0
Fork 0

New archive handling, and an adjustment to the existing archive

This commit is contained in:
Luca Beltrame 2015-05-24 11:13:45 +02:00
parent 897a130e29
commit 4c4d9c5696
3 changed files with 44 additions and 1 deletions

View file

@ -229,5 +229,14 @@ disqus_commments:
forum_name: dennogumi
limit: 5
archive:
- path: /:year
layout: archive
title: Blog archive - :year
- path: /:year/:month
layout: archive
title: Blog Archive - :month :year
gems:
- jekyll/itafroma/archive
- jekyll-sitemap

34
_layouts/archive.html Normal file
View file

@ -0,0 +1,34 @@
---
license: MIT
layout: default
format: page
comments: false
show_meta: false
---
<div id="blog-index" class="row">
<div class="small-12 columns t30">
<h1>{{ page.title }}</h1>
<ul class="side-nav">
{% for post in page.archive.posts reversed %}
<li><a href="{{post.url}}">{{ post.title }}</a></li>
{% endfor %}
</ul>
</div>
<!-- Pagination links -->
<div class="medium-8 columns t30">
<nav id="pagination">
{% if page.archive.paginator.previous_page %}
<a class="radius button small" href="{{ page.archive.paginator.previous_page_path }}" class="previous">Previous</a>
{% else %}
<span class="radius button disabled small" class="previous">Previous</span>
{% endif %}
<span class="page_number">Page: {{ page.archive.paginator.page }} of {{ page.archive.paginator.total_pages }}</span>
{% if page.archive.paginator.next_page %}
<a class="radius button small" href="{{ page.archive.paginator.next_page_path }}" class="next">Next</a>
{% else %}
<span class="radius button disabled small" class="next">Next</span>
{% endif %}
</nav>
</div> <!-- medium-8 columns t30 -->
</div> <!-- row -->

View file

@ -14,7 +14,7 @@ permalink: "archive/"
<dl class="accordion" data-accordion>
{% assign counter = 1 %}
{% for post in site.posts limit:1000 %}
{% for post in site.posts limit:1000 reversed %}
<dd class="accordion-navigation">
<a href="#panel{{ counter }}"><span class="iconfont"></span> {% if post.subheadline %}{{ post.subheadline }} {% endif %}<strong>{{ post.title }}</strong></a>
<div id="panel{{ counter }}" class="content">