hexo-generator-sitemap icon indicating copy to clipboard operation
hexo-generator-sitemap copied to clipboard

dynamically generated pages are not included in the sitemap

Open lgradzki-cksource opened this issue 1 year ago • 2 comments

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 🙇

lgradzki-cksource avatar Apr 17 '23 14:04 lgradzki-cksource