-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: LiveBlogPosting
#1471
base: master
Are you sure you want to change the base?
feat: LiveBlogPosting
#1471
Conversation
const blogVersions = versionSchemas(blog100); | ||
export default blogVersions; | ||
export { blogVersions as default, blog100 }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed to reuse the schema inside the liveblog-schema.js
}, | ||
coverageStartTime: '2023-11-03T11:00:00+02:00', | ||
coverageEndTime: '2023-11-03T19:00:00+02:00', | ||
liveBlogUpdate: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The liveBlogUpdate
items could contain plenty of additional props because they are instances of BlogPosting
but I decided to keep it short.
type: 'array', | ||
items: { | ||
...blog100.schema, | ||
required: ['@type'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all the properties of BlogPosting
are required, where could I find out which props are really required in this context ?
['author', 'mainEntityOfPage'].forEach(key => { | ||
liveblog100.schema.properties.liveBlogUpdate.items.properties[ | ||
key | ||
].required = false; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even with required: ['@type'],
, the properties:
author
mainEntityOfPage
are still reported as missing in the E2E tests. As we are using instances BlogPosting
as children of liveBlogUpdate
these should be optional.
liveBlogUpdate={[ | ||
// From newer to older updates of type BlogPosting | ||
{ | ||
'@type': 'BlogPosting', | ||
headline: 'Next.js 14: No New APIs', | ||
articleBody: 'Lorem ipsum dolor sit amet …', | ||
datePublished: '2023-11-03T18:15:00+02:00', | ||
}, | ||
{ | ||
'@type': 'BlogPosting', | ||
headline: 'A faster, more personalized web.', | ||
articleBody: 'Lorem ipsum dolor sit amet …', | ||
datePublished: '2023-11-03T11:30:00+02:00', | ||
}, | ||
{ | ||
'@type': 'BlogPosting', | ||
headline: 'Conference will start soon', | ||
articleBody: 'In a few hours …', | ||
datePublished: '2023-11-03T11:00:00+02:00', | ||
}, | ||
]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the correct way to declare the BlogPosting
updates ? Feedbacks are welcome 👍
Description of Change(s):
This MR fixes the issue #1468
Documentation
As
LiveBlogPosting
is just a subtype ofArticle
, I did not update the documentation.E2E Tests
Cypress tests were added which demonstrate some uses of the live coverage.
Additional information
https://schema.org/LiveBlogPosting
At the moment, the Google Validator does not handle the
LiveBlogPosting
type while using it in the search results.The Schema.org validator can handle
LiveBlogPosting
type but I cannot find which of its fields are required or optional...Thank you for considering this MR.