hexo-theme-stellar/scripts/generators/author.js

23 lines
454 B
JavaScript
Raw Normal View History

2024-01-04 22:50:57 +08:00
/**
* author v1 | https://github.com/xaoxuu/hexo-theme-stellar/
*/
hexo.extend.generator.register('author', function (locals) {
const { authors } = hexo.theme.config
var pages = []
for (let key of Object.keys(authors)) {
const author = authors[key]
if (author.hidden) {
continue
}
pages.push({
path: author.path,
layout: ['archive'],
data: {
'author': author
}
})
}
return pages
});