mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 10:52:35 +02:00
misc(v2): misc fixes
This commit is contained in:
parent
95b0cb942f
commit
d64581f2b4
9 changed files with 27 additions and 34 deletions
|
@ -29,21 +29,17 @@ module.exports = async function createSitemap({
|
|||
);
|
||||
}
|
||||
|
||||
const urls = [];
|
||||
const urls = allMetadatas.map(metadata => ({
|
||||
url: metadata.permalink,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.5,
|
||||
}));
|
||||
|
||||
allMetadatas.forEach(metadata => {
|
||||
urls.push({
|
||||
url: metadata.permalink,
|
||||
changefreq: 'weekly',
|
||||
priority: 0.5,
|
||||
});
|
||||
});
|
||||
|
||||
const sm = sitemap.createSitemap({
|
||||
const generatedSitemap = sitemap.createSitemap({
|
||||
hostname: siteUrl,
|
||||
cacheTime: 600 * 1000, // 600 sec - cache purge period
|
||||
urls,
|
||||
});
|
||||
|
||||
return sm.toString();
|
||||
return generatedSitemap.toString();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue