16 lines
395 B
JavaScript
16 lines
395 B
JavaScript
module.exports = function createSitemap() {
|
|
return {
|
|
$runAfter: ['paths-computed'],
|
|
$runBefore: ['rendering-docs'],
|
|
$process(docs) {
|
|
docs.push({
|
|
id: 'sitemap.xml',
|
|
path: 'sitemap.xml',
|
|
outputPath: '../sitemap.xml',
|
|
template: 'sitemap.template.xml',
|
|
urls: docs.filter(doc => doc.outputPath).map(doc => doc.path)
|
|
});
|
|
}
|
|
};
|
|
};
|