@@ -58,7 +58,8 @@ const processBatch = async ({
58
58
59
59
// Set the source of the publication and whether it's a page or post for tracking and later processing
60
60
obj . source = 'Ghost' ;
61
- obj . contentType = contentType === 'posts' ? 'post' : 'page' ;
61
+ const singularContentType = contentType . slice ( 0 , - 1 ) ;
62
+ obj . contentType = singularContentType ;
62
63
63
64
// Set a default feature image for posts if one doesn't exist
64
65
if ( contentType === 'posts' && ! obj . feature_image )
@@ -70,7 +71,7 @@ const processBatch = async ({
70
71
obj . image_dimensions = { ...obj . image_dimensions } ;
71
72
obj . image_dimensions . feature_image = await getImageDimensions (
72
73
obj . feature_image ,
73
- obj . title
74
+ `Ghost ${ singularContentType } feature image: ${ obj . title } `
74
75
) ;
75
76
}
76
77
@@ -82,8 +83,7 @@ const processBatch = async ({
82
83
obj . primary_author . image_dimensions . profile_image =
83
84
await getImageDimensions (
84
85
obj . primary_author . profile_image ,
85
- obj . primary_author . name ,
86
- true
86
+ `Ghost author profile image: ${ obj . primary_author . name } `
87
87
) ;
88
88
}
89
89
@@ -94,8 +94,7 @@ const processBatch = async ({
94
94
obj . primary_author . image_dimensions . cover_image =
95
95
await getImageDimensions (
96
96
obj . primary_author . cover_image ,
97
- obj . primary_author . name ,
98
- true
97
+ `Ghost author cover image: ${ obj . primary_author . name } `
99
98
) ;
100
99
}
101
100
@@ -106,8 +105,7 @@ const processBatch = async ({
106
105
tag . image_dimensions = { ...tag . image_dimensions } ;
107
106
tag . image_dimensions . feature_image = await getImageDimensions (
108
107
tag . feature_image ,
109
- tag . name ,
110
- true
108
+ `Ghost tag feature image: ${ tag . name } `
111
109
) ;
112
110
}
113
111
} )
0 commit comments