Skip to content

Commit

Permalink
Merge pull request #40 from f-dong/BUG修复
Browse files Browse the repository at this point in the history
[BUG]文章置顶不起作用
  • Loading branch information
f-dong authored May 13, 2024
2 parents d1220b2 + 9061fa4 commit 7b23047
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 7b23047

Please sign in to comment.