Skip to content

Commit

Permalink
fix: sitemap language should not allow lastmod (#1020)
Browse files Browse the repository at this point in the history
  • Loading branch information
dominique-pfister authored Oct 29, 2024
1 parent 311ef42 commit e3d5dd0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
]
}
},
"additionalProperties": false,
"required": [
"destination",
"hreflang"
Expand Down
6 changes: 6 additions & 0 deletions packages/helix-shared-config/test/sitemapconfigs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ HREF Language must match pattern`,
error: `Error: Invalid configuration:
HREF Language must match pattern`,
},
{
title: 'loads an example with a language defining lastmod',
config: 'broken5.yaml',
error: `Error: Invalid configuration:
Sitemap Language has unknown property 'lastmod'`,
},
];

describe('Sitemap Config Loading', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 1

sitemaps:
broken:
origin: https://www.example.com
languages:
en:
source: /query-index.json
destination: /sitemap-en.xml
hreflang: en
lastmod: YYYY-MM-DD

0 comments on commit e3d5dd0

Please sign in to comment.