MCPcopy Create free account
hub / github.com/nodejs/nodejs.org / getSitemapEntry

Function getSitemapEntry

apps/site/app/sitemap.ts:34–39  ·  view source on GitHub ↗
(r: string, locales: Array<string> = [])

Source from the content-addressed store, hash-verified

32 const currentDate = new Date().toISOString();
33
34 const getSitemapEntry = (r: string, locales: Array<string> = []) => ({
35 url: getFullPath(r, defaultLocale.code),
36 lastModified: currentDate,
37 changeFrequency: 'always' as const,
38 alternates: { languages: getAlternatePaths(r, locales) },
39 });
40
41 const staticPaths = routes.map(r => getSitemapEntry(r, nonDefaultLocales));
42 const blogPaths = BLOG_DYNAMIC_ROUTES.map(r => getSitemapEntry(`blog/${r}`));

Callers 1

sitemapFunction · 0.85

Calls 2

getFullPathFunction · 0.85
getAlternatePathsFunction · 0.85

Tested by

no test coverage detected