forked from maciakl/Sample-Jekyll-Site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
42 lines (35 loc) · 1.36 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
layout: default
title: Home
---
<!-- Show last 5 posts here -->
{% for post in paginator.posts %}
<article>
<header>
<h2><a href="{{site.baseurl}}{{post.url}}">{{ post.title }}</a></h2>
<span class="date"><i class="icon-clock"></i><time datetime="{{post.date|date:"%F"}}">{{post.date|date:"%b %d, %Y"}}</time></span><br/>
<span class="category"><i class="icon-tag"></i> {{ post.categories | category_links }}</span><br/>
<span class="author"><i class="icon-user"></i> {% if post.author %}{{post.author}}{% else %}{{site.author}}{% endif%}</span>
</header>
<div class="entry">{{ post.excerpt }}</div>
</article>
{% endfor %}
<div id="paginator">
{% if paginator.next_page %}
<a href="{{site.baseurl}}/page{{paginator.next_page}}">
« Older Posts</a>
{% endif %}
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<span class="more">
<a href="{{site.baseurl}}/">
Newer Posts » </a>
</span>
{% else %}
<span class="more">
<a href="{{site.baseurl}}/page{{paginator.previous_page}}">
Newer Posts » </a>
</span>
{% endif %}
{% endif %}
</div>