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

Function getAlternatePaths

apps/site/app/sitemap.ts:24–25  ·  view source on GitHub ↗
(r: string, locales: Array<string>)

Source from the content-addressed store, hash-verified

22 /^https?:\/\//.test(r) ? r : `${baseUrlAndPath}/${l}/${r}`;
23
24const getAlternatePaths = (r: string, locales: Array<string>) =>
25 Object.fromEntries(locales.map(l => [l, getFullPath(r, l)]));
26
27// This allows us to generate a `sitemap.xml` file dynamically based on the needs of the Node.js Website
28const sitemap = async (): Promise<MetadataRoute.Sitemap> => {

Callers 1

getSitemapEntryFunction · 0.85

Calls 1

getFullPathFunction · 0.85

Tested by

no test coverage detected