Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 68 lines (57 sloc) 2.06 KB
---
layout: default
---
<ul id="posts">
{% for post in paginator.posts %}
{% if post.tags contains 'DO_NOT_SHOW_IN_POSTS' or post.tags contains 'ARCHIVE' %}
{% else %}
<li class="post">
<h2>
<a href="{% if site.baseurl == "/" %}{{ post.url }}{% else %}{{ post.url | prepend: site.baseurl }}{% endif %}">
{{ post.title }}
</a>
</h2>
<time datetime="{{ post.date | date_to_xmlschema }}" class="by-line">
{{ post.date | date_to_string }}
{% if post.tags != empty %}
&nbsp;&nbsp; {{ post.tags | join: ", " }}
{% endif %}
</time>
<p>
{{ post.content | strip_html | truncatewords:50 }}
</p>
</li>
{% endif %}
{% endfor %}
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&laquo;</a>
{% elsif paginator.previous_page%}
<a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&laquo;</a>
{% else %}
<span class="page-item">&laquo;</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span class="page-item">{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ '/' | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}" class="page-item">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}" class="page-item">&raquo;</a>
{% else %}
<span class="page-item">&raquo;</span>
{% endif %}
{% for page in site.pages %}
{% if page.title == 'Archive' %}
<a href="{{ page.url }}" class="page-item">{{ page.title }}</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</ul>