umberto 7.0.1 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/tasks/create-sitemap-index.js +12 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
## [7.0.2](https://github.com/cksource/umberto/compare/v7.0.1...v7.0.2) (2025-05-20)
|
|
5
|
+
|
|
6
|
+
### Bug fixes
|
|
7
|
+
|
|
8
|
+
* Fixed an invalid protocol (should be `https://` instead of `https:/`) in the generated index sitemap file. Closes [#1277](https://github.com/cksource/umberto/issues/1277). ([commit](https://github.com/cksource/umberto/commit/6f59654e85b1230fbfe029efe68f708755ec6342))
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
## [7.0.1](https://github.com/cksource/umberto/compare/v7.0.0...v7.0.1) (2025-05-14)
|
|
5
12
|
|
|
6
13
|
### Other changes
|
package/package.json
CHANGED
|
@@ -28,11 +28,18 @@ module.exports = ( { buildPath, hostname, sitemapPaths } ) => {
|
|
|
28
28
|
const sitemapIndexContent = [
|
|
29
29
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
30
30
|
`<sitemapindex ${ XMLNS_STRINGS.join( ' ' ) }>`,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
'
|
|
35
|
-
|
|
31
|
+
|
|
32
|
+
...sitemapPaths.map( sitemapPath => {
|
|
33
|
+
const relativePath = sitemapPath.split( buildPath ).pop().replace( /^\/+/, '' );
|
|
34
|
+
const fullUrl = new URL( relativePath, hostname.endsWith( '/' ) ? hostname : hostname + '/' );
|
|
35
|
+
|
|
36
|
+
return [
|
|
37
|
+
'<sitemap>',
|
|
38
|
+
`<loc>${ fullUrl.toString() }</loc>`,
|
|
39
|
+
'</sitemap>'
|
|
40
|
+
];
|
|
41
|
+
} ),
|
|
42
|
+
|
|
36
43
|
'</sitemapindex>'
|
|
37
44
|
].flat().join( '' );
|
|
38
45
|
|