diff --git a/core/server/data/xml/sitemap/base-generator.js b/core/server/data/xml/sitemap/base-generator.js index 9ae755a761..98c0dc90ef 100644 --- a/core/server/data/xml/sitemap/base-generator.js +++ b/core/server/data/xml/sitemap/base-generator.js @@ -65,7 +65,13 @@ class BaseSiteMapGenerator { } getLastModifiedForDatum(datum) { - return datum.updated_at || datum.published_at || datum.created_at; + if (datum.updated_at || datum.published_at || datum.created_at) { + const modifiedDate = datum.updated_at || datum.published_at || datum.created_at; + + return moment(modifiedDate); + } else { + return moment(); + } } updateLastModified(datum) { diff --git a/core/server/services/url/configs/v0.1.js b/core/server/services/url/configs/v0.1.js index 35172938f3..55fa266a76 100644 --- a/core/server/services/url/configs/v0.1.js +++ b/core/server/services/url/configs/v0.1.js @@ -27,7 +27,6 @@ module.exports = [ 'twitter_title', 'twitter_description', 'custom_template', - 'feature_image', 'locale' ], withRelated: ['tags', 'authors'], @@ -68,7 +67,6 @@ module.exports = [ 'twitter_title', 'twitter_description', 'custom_template', - 'feature_image', 'locale', 'tags', 'authors', diff --git a/core/server/services/url/configs/v2.js b/core/server/services/url/configs/v2.js index f7384650e6..6d91c3a483 100644 --- a/core/server/services/url/configs/v2.js +++ b/core/server/services/url/configs/v2.js @@ -30,7 +30,6 @@ module.exports = [ 'twitter_title', 'twitter_description', 'custom_template', - 'feature_image', 'locale' ], withRelated: ['tags', 'authors'], @@ -74,7 +73,6 @@ module.exports = [ 'twitter_title', 'twitter_description', 'custom_template', - 'feature_image', 'locale', 'tags', 'authors', @@ -98,9 +96,7 @@ module.exports = [ 'description', 'meta_title', 'meta_description', - 'parent_id', - 'created_at', - 'updated_at' + 'parent_id' ], filter: 'visibility:public', shouldHavePosts: {