diff --git a/backend/src/main/java/com/printcalculator/service/shop/ShopSitemapService.java b/backend/src/main/java/com/printcalculator/service/shop/ShopSitemapService.java index 26aa397..e3cf38a 100644 --- a/backend/src/main/java/com/printcalculator/service/shop/ShopSitemapService.java +++ b/backend/src/main/java/com/printcalculator/service/shop/ShopSitemapService.java @@ -146,8 +146,22 @@ public class ShopSitemapService { return; } + for (String locLanguage : SUPPORTED_LANGUAGES) { + String locHref = hrefByLanguage.get(locLanguage); + if (locHref == null || locHref.isBlank()) { + continue; + } + appendLocalizedUrlEntry(xml, locHref, hrefByLanguage, defaultHref, lastmod); + } + } + + private void appendLocalizedUrlEntry(StringBuilder xml, + String locHref, + Map hrefByLanguage, + String defaultHref, + OffsetDateTime lastmod) { xml.append(" \n"); - xml.append(" ").append(xmlEscape(defaultHref)).append("\n"); + xml.append(" ").append(xmlEscape(locHref)).append("\n"); for (String language : SUPPORTED_LANGUAGES) { String href = hrefByLanguage.get(language); diff --git a/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java b/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java index d2eace0..988b13e 100644 --- a/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java +++ b/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java @@ -89,10 +89,16 @@ class ShopSitemapServiceTest { String xml = service.getShopSitemapXml(); assertTrue(xml.contains("https://3d-fab.ch/it/shop/accessori")); + assertTrue(xml.contains("https://3d-fab.ch/en/shop/accessori")); + assertTrue(xml.contains("https://3d-fab.ch/de/shop/accessori")); + assertTrue(xml.contains("https://3d-fab.ch/fr/shop/accessori")); assertTrue(xml.contains("hreflang=\"en\" href=\"https://3d-fab.ch/en/shop/accessori\"")); assertFalse(xml.contains("https://3d-fab.ch/it/shop/bozza")); assertTrue(xml.contains("https://3d-fab.ch/it/shop/p/123e4567-supporto-bici")); + assertTrue(xml.contains("https://3d-fab.ch/en/shop/p/123e4567-bike-holder")); + assertTrue(xml.contains("https://3d-fab.ch/de/shop/p/123e4567-fahrrad-halter")); + assertTrue(xml.contains("https://3d-fab.ch/fr/shop/p/123e4567-support-velo")); assertTrue(xml.contains("hreflang=\"en\" href=\"https://3d-fab.ch/en/shop/p/123e4567-bike-holder\"")); assertTrue(xml.contains("hreflang=\"de\" href=\"https://3d-fab.ch/de/shop/p/123e4567-fahrrad-halter\"")); assertTrue(xml.contains("hreflang=\"x-default\" href=\"https://3d-fab.ch/it/shop/p/123e4567-supporto-bici\"")); diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt index b0af970..33ad35b 100644 --- a/frontend/public/robots.txt +++ b/frontend/public/robots.txt @@ -9,9 +9,9 @@ Disallow: /order Disallow: /order/ Disallow: /*/order Disallow: /*/order/ -Disallow: /co +Disallow: /co$ Disallow: /co/ -Disallow: /*/co +Disallow: /*/co$ Disallow: /*/co/ Disallow: /checkout Disallow: /checkout/ diff --git a/frontend/public/sitemap-static.xml b/frontend/public/sitemap-static.xml index c81cb56..b7020d5 100644 --- a/frontend/public/sitemap-static.xml +++ b/frontend/public/sitemap-static.xml @@ -1,8 +1,5 @@ - + https://3d-fab.ch/it @@ -13,66 +10,119 @@ weekly 1.0 + + https://3d-fab.ch/en + + + + + + weekly + 1.0 + + + https://3d-fab.ch/de + + + + + + weekly + 1.0 + + + https://3d-fab.ch/fr + + + + + + weekly + 1.0 + + https://3d-fab.ch/it/calculator/basic - - - - - + + + + + weekly 0.9 + + https://3d-fab.ch/en/calculator/basic + + + + + + weekly + 0.9 + + + https://3d-fab.ch/de/calculator/basic + + + + + + weekly + 0.9 + + + https://3d-fab.ch/fr/calculator/basic + + + + + + weekly + 0.9 + + https://3d-fab.ch/it/calculator/advanced - - - - - + + + + + weekly 0.8 + + https://3d-fab.ch/en/calculator/advanced + + + + + + weekly + 0.8 + + + https://3d-fab.ch/de/calculator/advanced + + + + + + weekly + 0.8 + + + https://3d-fab.ch/fr/calculator/advanced + + + + + + weekly + 0.8 + + https://3d-fab.ch/it/shop @@ -83,64 +133,160 @@ weekly 0.8 + + https://3d-fab.ch/en/shop + + + + + + weekly + 0.8 + + + https://3d-fab.ch/de/shop + + + + + + weekly + 0.8 + + + https://3d-fab.ch/fr/shop + + + + + + weekly + 0.8 + + https://3d-fab.ch/it/about - + monthly 0.7 - https://3d-fab.ch/it/contact - - - - - + https://3d-fab.ch/en/about + + + + + monthly 0.7 + + https://3d-fab.ch/de/about + + + + + + monthly + 0.7 + + + https://3d-fab.ch/fr/about + + + + + + monthly + 0.7 + + + + https://3d-fab.ch/it/contact + + + + + + monthly + 0.7 + + + https://3d-fab.ch/en/contact + + + + + + monthly + 0.7 + + + https://3d-fab.ch/de/contact + + + + + + monthly + 0.7 + + + https://3d-fab.ch/fr/contact + + + + + + monthly + 0.7 + + https://3d-fab.ch/it/privacy - + yearly 0.4 + + https://3d-fab.ch/en/privacy + + + + + + yearly + 0.4 + + + https://3d-fab.ch/de/privacy + + + + + + yearly + 0.4 + + + https://3d-fab.ch/fr/privacy + + + + + + yearly + 0.4 + + https://3d-fab.ch/it/terms @@ -151,4 +297,34 @@ yearly 0.4 + + https://3d-fab.ch/en/terms + + + + + + yearly + 0.4 + + + https://3d-fab.ch/de/terms + + + + + + yearly + 0.4 + + + https://3d-fab.ch/fr/terms + + + + + + yearly + 0.4 + diff --git a/frontend/src/assets/images/joe.jpg b/frontend/src/assets/images/joe.jpg deleted file mode 100644 index 45d4f48..0000000 Binary files a/frontend/src/assets/images/joe.jpg and /dev/null differ diff --git a/frontend/src/assets/images/matteo.jpg b/frontend/src/assets/images/matteo.jpg deleted file mode 100644 index 96234fe..0000000 Binary files a/frontend/src/assets/images/matteo.jpg and /dev/null differ