diff --git a/package.json b/package.json index bfa9fd8..aa2b751 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/scripts/filters/post-hide.js b/scripts/filters/post-hide.js index 1384311..6f18d1f 100644 --- a/scripts/filters/post-hide.js +++ b/scripts/filters/post-hide.js @@ -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, {