-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (49 loc) · 1.66 KB
/
index.html
File metadata and controls
56 lines (49 loc) · 1.66 KB
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
53
54
55
56
---
# 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: default
---
<div class="posts">
<!-- This loops through the paginated posts -->
{%- for post in paginator.posts -%}
<div class="post">
<h3 class="post-title">
<a class="post-link" href="{{ post.url | relative_url }}">
{{ post.title | escape }}
</a>
</h3>
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
<p class="post-meta">
<time class="post-date" datetime="{{ post.date | date_to_xmlschema }}">
{{ post.date | date: date_format }}
</time>
{%- if post.author -%} - <span class="post-author">{{ post.author }}</span>{%- endif -%}
</p>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</div>
{%- endfor -%}
<!-- Pagination links -->
{% if paginator.total_pages > 1 %}
<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path | relative_url }}">« 上一页</a>
{% else %}
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<span>{{ page }}</span>
{% elsif page == 1 %}
<a href="{{ '/' | 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 %}
{% endif %}
</div>
{% endif %}
</div>