mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-30 21:40:39 +03:00
🐛 Fixed sitemap generation with correct date and images value (#10668)
closes #10640 - Updated sitemap resources data to include certain fields - Fixes sitemap date and images value - Updated date handling for sitemap nodes
This commit is contained in:
parent
87b37556c8
commit
35c4da710a
@ -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) {
|
||||
|
@ -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',
|
||||
|
@ -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: {
|
||||
|
Loading…
Reference in New Issue
Block a user