We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 271c813 commit 39a285aCopy full SHA for 39a285a
web/src/build/sitemap.ts
@@ -47,9 +47,17 @@ writeStream.on("error", (err) => {
47
writeStream.on("ready", () => {
48
sitemap.pipe(writeStream);
49
urls.forEach((url) => {
50
- sitemap.write(url, undefined, (err) => {
51
- if (err) console.log("Sitemap generation error", err);
52
- });
+ const lang = allLanguages.find(({ code }) => `/${code}/` === url.substring(0, 4))?.code || "en";
+ sitemap.write(
+ {
53
+ url,
54
+ links: [{ lang, url }],
55
+ },
56
+ undefined,
57
+ (err) => {
58
+ if (err) console.log("Sitemap generation error", err);
59
60
+ );
61
});
62
63
sitemap.end();
0 commit comments