diff --git a/package-lock.json b/package-lock.json index c19fc25c..265a4950 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15850,7 +15850,7 @@ }, "packages/helix-shared-body-data": { "name": "@adobe/helix-shared-body-data", - "version": "2.1.1", + "version": "2.1.2", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "^4.0.1", @@ -15891,7 +15891,7 @@ }, "packages/helix-shared-config": { "name": "@adobe/helix-shared-config", - "version": "10.4.5", + "version": "10.4.6", "license": "Apache-2.0", "dependencies": { "@adobe/fetch": "^4.0.1", @@ -15948,7 +15948,7 @@ }, "packages/helix-shared-git": { "name": "@adobe/helix-shared-git", - "version": "3.0.9", + "version": "3.0.10", "license": "Apache-2.0", "dependencies": { "@adobe/helix-shared-prune": "^1.0.5", @@ -16257,10 +16257,10 @@ }, "packages/helix-shared-secrets": { "name": "@adobe/helix-shared-secrets", - "version": "2.2.6", + "version": "2.2.7", "license": "Apache-2.0", "dependencies": { - "@adobe/fetch": "^4.0.1", + "@adobe/fetch": "^4.1.3", "@adobe/helix-shared-wrap": "^1.0.5", "aws4": "^1.12.0" }, diff --git a/packages/helix-shared-config/src/schemas/sitemap-language.schema.json b/packages/helix-shared-config/src/schemas/sitemap-language.schema.json index 60649669..4eb09554 100644 --- a/packages/helix-shared-config/src/schemas/sitemap-language.schema.json +++ b/packages/helix-shared-config/src/schemas/sitemap-language.schema.json @@ -55,6 +55,14 @@ "/en/{path}", "/german/{path}" ] + }, + "extension": { + "type": "string", + "title": "Location extension", + "description": "Extension to append to every location generated for this sitemap. Default is empty", + "examples": [ + ".html" + ] } }, "required": [ diff --git a/packages/helix-shared-config/src/schemas/sitemap.schema.json b/packages/helix-shared-config/src/schemas/sitemap.schema.json index 79c0df49..d787bdcb 100644 --- a/packages/helix-shared-config/src/schemas/sitemap.schema.json +++ b/packages/helix-shared-config/src/schemas/sitemap.schema.json @@ -46,6 +46,14 @@ "additionalProperties": { "$ref": "https://ns.adobe.com/helix/shared/sitemap-language" } + }, + "extension": { + "type": "string", + "title": "Location extension", + "description": "Extension to append to every location generated for this sitemap. Default is empty", + "examples": [ + ".html" + ] } }, "required": [] diff --git a/packages/helix-shared-config/test/sitemapconfigs.test.js b/packages/helix-shared-config/test/sitemapconfigs.test.js index af6d276c..3dc1c5fc 100644 --- a/packages/helix-shared-config/test/sitemapconfigs.test.js +++ b/packages/helix-shared-config/test/sitemapconfigs.test.js @@ -27,6 +27,11 @@ const tests = [ config: 'simple.yaml', result: 'simple.json', }, + { + title: 'loads a simple example with extension', + config: 'simple-extension.yaml', + result: 'simple-extension.json', + }, { title: 'loads an example with multiple languages', config: 'multilang.yaml', diff --git a/packages/helix-shared-config/test/specs/sitemapconfigs/multilang-extension.json b/packages/helix-shared-config/test/specs/sitemapconfigs/multilang-extension.json new file mode 100644 index 00000000..e373d1b5 --- /dev/null +++ b/packages/helix-shared-config/test/specs/sitemapconfigs/multilang-extension.json @@ -0,0 +1,28 @@ +{ + "sitemaps": { + "multilang": { + "origin": "https://www.example.com", + "languages": { + "en": { + "source": "/en/query-index.json", + "destination": "/sitemap-en.xml", + "hreflang": "en" + }, + "fr": { + "source": "/fr/query-index.json", + "destination": "/sitemap-fr.xml", + "hreflang": "fr", + "alternate": "/fr/{path}", + "extension": ".html" + }, + "la": { + "source": "/la/query-index.json", + "destination": "/sitemap-la.xml", + "hreflang": ["es-VE","es-SV","es-PA"], + "alternate": "/la/{path}" + } + } + } + }, + "version": 1 +} diff --git a/packages/helix-shared-config/test/specs/sitemapconfigs/multilang-extension.yaml b/packages/helix-shared-config/test/specs/sitemapconfigs/multilang-extension.yaml new file mode 100644 index 00000000..ff58f186 --- /dev/null +++ b/packages/helix-shared-config/test/specs/sitemapconfigs/multilang-extension.yaml @@ -0,0 +1,24 @@ +version: 1 + +sitemaps: + multilang: + origin: https://www.example.com + languages: + en: + source: /en/query-index.json + destination: /sitemap-en.xml + hreflang: en + fr: + source: /fr/query-index.json + destination: /sitemap-fr.xml + hreflang: fr + alternate: /fr/{path} + extension: .html + la: + source: /la/query-index.json + destination: /sitemap-la.xml + hreflang: + - es-VE + - es-SV + - es-PA + alternate: /la/{path} diff --git a/packages/helix-shared-config/test/specs/sitemapconfigs/simple-extension.json b/packages/helix-shared-config/test/specs/sitemapconfigs/simple-extension.json new file mode 100644 index 00000000..652cf533 --- /dev/null +++ b/packages/helix-shared-config/test/specs/sitemapconfigs/simple-extension.json @@ -0,0 +1,11 @@ +{ + "sitemaps": { + "simple": { + "origin": "https://www.example.com", + "source": "/query-index.json", + "destination": "/sitemap-en.xml", + "extension": ".html" + } + }, + "version": 1 +} diff --git a/packages/helix-shared-config/test/specs/sitemapconfigs/simple-extension.yaml b/packages/helix-shared-config/test/specs/sitemapconfigs/simple-extension.yaml new file mode 100644 index 00000000..7a3952b6 --- /dev/null +++ b/packages/helix-shared-config/test/specs/sitemapconfigs/simple-extension.yaml @@ -0,0 +1,8 @@ +version: 1 + +sitemaps: + simple: + origin: https://www.example.com + source: /query-index.json + destination: /sitemap-en.xml + extension: .html