hexo-generator-indexed
Advanced tools
Comparing version 1.0.1 to 1.1.0
'use strict'; | ||
const pagination = require('hexo-pagination'); | ||
const _ = require('lodash'); | ||
@@ -25,3 +24,3 @@ module.exports = function(locals) { | ||
posts.data = _.orderBy(posts.data, post => post.sticky || 0, "desc"); | ||
posts.data.sort((x, y) => (y.sticky || 0) - (x.sticky || 0)); | ||
@@ -28,0 +27,0 @@ const paginationDir = config.pagination_dir || 'page'; |
{ | ||
"name": "hexo-generator-indexed", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Index generator for Hexo.", | ||
@@ -23,5 +23,5 @@ "main": "index", | ||
"type": "git", | ||
"url": "https://github.com/stevenjoezhang/hexo-generator-indexed.git" | ||
"url": "https://github.com/hexo-next/hexo-generator-indexed.git" | ||
}, | ||
"homepage": "https://github.com/stevenjoezhang/hexo-generator-indexed", | ||
"homepage": "https://github.com/hexo-next/hexo-generator-indexed", | ||
"keywords": [ | ||
@@ -36,3 +36,3 @@ "hexo", | ||
"maintainers": [ | ||
"Mimi <stevenjoezhang@gmail.com> (https://zhangshuqiao.org)" | ||
"Mimi <hexo-next@gmail.com> (https://zhangshuqiao.org)" | ||
], | ||
@@ -45,9 +45,8 @@ "license": "MIT", | ||
"hexo": "4.2.0", | ||
"mocha": "6.2.2", | ||
"nyc": "15.0.0" | ||
"mocha": "7.1.1", | ||
"nyc": "15.0.1" | ||
}, | ||
"dependencies": { | ||
"hexo-pagination": "1.0.0", | ||
"lodash": "^4.17.15" | ||
"hexo-pagination": "1.0.0" | ||
} | ||
} |
@@ -60,3 +60,3 @@ # hexo-generator-indexed | ||
采用`sticky`关键词是因为这个在[NexT主题](https://github.com/theme-next/hexo-theme-next)中已经定义了置顶样式,因此可以直接拿来使用。 | ||
采用`sticky`关键词是因为这个在[NexT主题](https://github.com/hexo-next/hexo-theme-next)中已经定义了置顶样式,因此可以直接拿来使用。 | ||
@@ -63,0 +63,0 @@ ### 隐藏文章 Hide article |
1
6442
38
- Removedlodash@^4.17.15
- Removedlodash@4.17.21(transitive)