修复置顶文章bug
This commit is contained in:
1 parent
598fd02885
commit
34dad82f75
2 files changed
+4
-4
No files matched your search
@@ -4,8 +4,8 @@
|
||||
<div class="recent-posts section">
|
||||
<h2 class="section-header">随笔<i class="ri-quill-pen-line"></i></h2>
|
||||
<div class="posts">
|
||||
<!-- 使用 ByWeight 来排序 -->
|
||||
{{ $posts := where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden" | sort "Weight" "asc" }}
|
||||
<!-- 使用 sort 对文章按 Weight 排序 -->
|
||||
{{ $posts := sort (where (where .Site.RegularPages "Type" "post") "Params.status" "ne" "hidden") "Weight" }}
|
||||
{{ $paginator := .Paginate $posts }}
|
||||
|
||||
{{ range $paginator.Pages }}
|
||||
@@ -26,7 +26,7 @@
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
</article>
|
||||
<ul class="pagination">
|
||||
<li class="page-item page-next">
|
||||
{{ if $paginator.HasNext }}
|
||||
|
||||
Reference in new issue
Block a user