Skip to content

Commit

Permalink
[BUG]文章置顶不起作用
Browse files Browse the repository at this point in the history
  • Loading branch information
f-dong committed May 13, 2024
1 parent 5f7c247 commit 9061fa4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-minimalism",
"version": "1.3.10",
"version": "1.3.11",
"private": false,
"description": "a minimalist Hexo theme that is simple yet elegant, enabling your blog content to shine. Its powerful features also help you create a personalized blog that truly stands out.",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions scripts/filters/post-hide.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ hexo.extend.generator.register('index', locals => {
const { index_generator } = hexo.config;
locals.posts = locals.posts.sort(index_generator.order_by || '-date');

locals.posts.data.sort((a, b) => (b.sticky || 0) - (a.sticky || 0));

if (index_generator.per_page > 0) {
const pagination = require('hexo-pagination');
return pagination(index_generator.path || '', locals.posts, {
Expand Down

0 comments on commit 9061fa4

Please sign in to comment.