2024-01-04 22:50:57 +08:00
|
|
|
/**
|
|
|
|
* author v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
|
|
|
*/
|
|
|
|
|
|
|
|
hexo.extend.generator.register('author', function (locals) {
|
2024-01-14 16:42:20 +08:00
|
|
|
const { root, authors } = hexo.theme.config
|
2024-01-04 22:50:57 +08:00
|
|
|
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: {
|
2024-01-14 16:42:20 +08:00
|
|
|
author: author,
|
|
|
|
menu_id: root.author.menu_id
|
2024-01-04 22:50:57 +08:00
|
|
|
}
|
|
|
|
})
|
|
|
|
}
|
|
|
|
return pages
|
|
|
|
});
|