Skip to content

Commit 914652c

Browse files
committed
refactor: review
1 parent 18c9357 commit 914652c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

src/generators/sitemap/index.mjs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,19 @@ export default {
4545
};
4646
});
4747

48-
const mainPages = [
49-
{
50-
loc: new URL('/docs/latest/api/', BASE_URL).href,
51-
lastmod,
52-
changefreq: 'daily',
53-
priority: '1.0',
54-
},
55-
];
56-
57-
const allPages = [...mainPages, ...apiPages];
48+
apiPages.push({
49+
loc: new URL('/docs/latest/api/', BASE_URL).href,
50+
lastmod,
51+
changefreq: 'daily',
52+
priority: '1.0',
53+
});
5854

5955
const template = await readFile(
6056
join(import.meta.dirname, 'template.xml'),
6157
'utf-8'
6258
);
6359

64-
const urlset = allPages
60+
const urlset = apiPages
6561
.map(
6662
page => dedent`
6763
<url>

0 commit comments

Comments
 (0)