hexo-generator-sitemap
hexo-generator-sitemap copied to clipboard
dynamically generated pages are not included in the sitemap
generating blog author pages
hexo.extend.generator.register(
'authors',
function (locals) {
authorsData = ['array of data'];
return authorsData.reduce((result, author) => {
const data = pagination(
'/blog/authors/' + author.slug,
author.posts,
{
layout: ['page'],
perPage: 10,
data: {
title: author.name ,
},
}
);
return result.concat(data);
}, []);
},
1
);
seems like pages generated dynamically with the code above are not included in the sitemap plugin output
is it that the moment the plugin is registered the newly created pages are not there yet? vide https://github.com/hexojs/hexo-generator-sitemap/blob/master/lib/generator.js#L23
note: pages are properly generated and are fully functional
any feedback is highly appreciated 🙇