Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(r: string) => {
const url = `${r}/${lang}`;
return {
url,
changefreq: sitemap.EnumChangefreq.WEEKLY,
priority: priorityMap[url] || 0.5,
links: [{ lang: 'en', url: `${r}/en` }, { lang: 'zh', url: `${r}/zh` }]
};
}
);
}
const sitemapInstance = sitemap.createSitemap({
hostname: 'https://ng.ant.design',
cacheTime: 600000,
urls: [
{ url: '/', changefreq: sitemap.EnumChangefreq.WEEKLY, priority: 0.5, lastmodrealtime: true },
...generateUrls('en'),
...generateUrls('zh')
]
});
writeFileSync(join(buildConfig.outputDir, 'sitemap.xml'), sitemapInstance.toString(true));
(r: string) => {
const url = `${r}/${lang}`;
return {
url,
changefreq: sitemap.EnumChangefreq.WEEKLY,
priority: priorityMap[url] || 0.5,
links: [{ lang: 'en', url: `${r}/en` }, { lang: 'zh', url: `${r}/zh` }]
};
}
);