-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (47 loc) · 1.64 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
43
44
45
46
47
48
49
50
51
52
---
# Feel free to add content and custom Front Matter to this file.
# To modify the layout, see https://jekyllrb.com/docs/themes/#overriding-theme-defaults
layout: home
---
{%- if site.posts.size > 0 -%}
<ul class="post-list">
{% for post in paginator.posts %}
<li>
{%- assign date_format = site.minima.date_format | default: "%Y-%m-%d" -%}
<span class="post-meta">{{ post.date | date: date_format }}</span>
<h3>
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</li>
{%- endfor -%}
</ul>
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | relative_url }}">« 上一页</a>
{% else %}
<span>« 上一页</span>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<b>{{ page }}</b>
{% elsif page == 1 %}
<a href="{{ paginator.previous_page_path | relative_url }}">{{ page }}</a>
{% else %}
<a href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path | relative_url }}">下一页 »</a>
{% else %}
<span>下一页 »</span>
{% endif %}
<span class="rss-subscribe"> ⬥ 通过 <a href="{{ "/feed.xml" | relative_url }}">RSS</a> 订阅</span>
</div>
{% endif %}
{%- endif -%}