Skip to content

Commit a3951c9

Browse files
committed
blog: fix config/layout/issues (index.md)
1 parent e808731 commit a3951c9

1 file changed

Lines changed: 19 additions & 4 deletions

File tree

‎index.md‎

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,29 @@ title: 主页
66

77
## 最新文章
88

9-
<ul>
10-
{% for post in site.posts %}
9+
<ul class="post-list">
10+
{% for post in paginator.posts %}
1111
<li>
12-
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
12+
<a class="post-title" href="{{ post.url | relative_url }}">{{ post.title }}</a>
1313
<span class="post-date">{{ post.date | date: "%Y年%m月%d日" }}</span>
14+
<p class="post-excerpt">{{ post.excerpt }}</p>
1415
</li>
1516
{% endfor %}
1617
</ul>
1718

19+
{% if paginator.total_pages > 1 %}
20+
<nav class="pagination">
21+
{% if paginator.previous_page %}
22+
<a href="{{ paginator.previous_page_path | relative_url }}">&laquo; 上一页</a>
23+
{% endif %}
24+
<span>第 {{ paginator.page }} / {{ paginator.total_pages }} 页</span>
25+
{% if paginator.next_page %}
26+
<a href="{{ paginator.next_page_path | relative_url }}">下一页 &raquo;</a>
27+
{% endif %}
28+
</nav>
29+
{% endif %}
30+
1831
#### 导航
19-
- [关于我](/about)
32+
- [关于我](/about/)
33+
- [标签归档](/tags/)
34+
- [RSS 订阅](/feed.xml)

0 commit comments

Comments
 (0)