Skip to content

dynamically generated pages are not included in the sitemap #153

Open
@lgradzki-cksource

Description

@lgradzki-cksource

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 🙇

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions