File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -75,12 +75,21 @@ export default withOGImage<'query', 'id'>({
75
75
// getPageProperty<string>('Description', block, recordMap) ||
76
76
// config.description
77
77
78
- const timePublished = getPageProperty < number > (
78
+ const lastUpdatedTime = getPageProperty < number > (
79
+ 'Last Updated' ,
80
+ block ,
81
+ recordMap
82
+ )
83
+ const publishedTime = getPageProperty < number > (
79
84
'Published' ,
80
85
block ,
81
86
recordMap
82
87
)
83
- const dateUpdated = timePublished ? new Date ( timePublished ) : undefined
88
+ const dateUpdated = lastUpdatedTime
89
+ ? new Date ( lastUpdatedTime )
90
+ : publishedTime
91
+ ? new Date ( publishedTime )
92
+ : undefined
84
93
const date =
85
94
isBlogPost && dateUpdated
86
95
? `${ dateUpdated . toLocaleString ( 'en-US' , {
You can’t perform that action at this time.
0 commit comments